How do I prevent the error without dropping the perl -w option? Or do I need to put in an code to check the value of $ar in the foreach loop?43 $sth=$dbh->prepare("select * from names where id=?"); 44 $sth->execute($poreq); 45 my @ar = $sth->fetchrow_array(); 46 foreach $ar (@ar) { 47 print "$ar \n"; 48 } 49 $sth->finish;
In reply to Use of uninitialized value at? by vivekvp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |