luoina has asked for the wisdom of the Perl Monks concerning the following question:
Nothing was printed out for @row1 by "print "@row1\n". In @IDnumber, only the last element of @row1 was printed out. would you please help me to figure this out? Thank you very much in advance. Young$dbh = DBI->connect('dbi:ODBC:Alex') || die "Error opening DB: $DBI::e +rrstr\n"; $sth = $dbh->prepare("SELECT Inumber FROM plana"); $sth->execute() or die "Couldn't execute query: $DBI::errstr\n"; while (my @row1 = $sth ->fetchrow_array){ print "@row1\n"; #All the elements were printed out by this state +ment. @IDnumber=@row1; } print "@row1\n"; print "@IDnumber\n";
|
|---|