in reply to Perl script to check database works or does it?
You need to move those calls outside the loop, or rather, as the docs recommend, don't use them at all - the statement handler going out of context does the same thing.while($ref = $sth1->fetchrow_hashref) { print FHExtract join (", ", values %$ref), "\n"; # Closing the statement handler $sth1->finish; } and while($ref1 = $sth2->fetchrow_hashref) { print FHExtract join (", ", values %$ref1), "\n"; # Closing the statement handler $sth2->finish; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl script to check database works or does it?
by chris01010 (Novice) on Jan 05, 2016 at 10:34 UTC |