On Tue, 23 Sep 2003 09:37:42 +1000, Fox, Michael wrote: >If you are not worried about the order in which the columns come back, you >could select straight into a hash and save a few lines of code
Or blend the two aproaches, use $sth->{NAME} to get an array of names in the proper order, and use a hash to get the records. my $names = $sth->name; while(my $r = $sth->fetchrow_hashref) { foreach my $name (@$names) { print "$name is $r->{$name}\n"; } } -- Bart.