use strict; use warnings; use DBI; my $dbh = DBI->connect("DBI:mysql:test", '*', '*') or die("booh"); my $sth = $dbh->prepare("select value from s") or die ("looh"); $sth->execute() or die("hoo"); while (my @array = $sth->fetchrow_array()) { defined($_) ? print "$_\n" : die "\$_ is undef\n"; } __END__ $_ is undef
In reply to Re^2: Returning two records with SELECT statement and then printing to file
by andreas1234567
in thread Returning two records with SELECT statement and then printing to file
by Win
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |