http://qs321.pair.com?node_id=1186436


in reply to Re^2: Populating an array via a DBI call - simplified
in thread Populating an array via a DBI call - simplified

If you don't really need the entire list of results in an array, you can just fetch one at a time like so:
my $sth = $dbh->prepare($sql); $sth->execute(); $sth->bind_col( 1, \my $user_name ); while ( $sth->fetch() ) { print "$user_name\n"; }