in reply to use strict and begin
will work fine.my $dbh; BEGIN {$dbh = DBI -> connect (...)} ... $dbh -> prepare (...);
But why are you using a BEGIN block to set up the database connection? Why not just
And if you really want to place it inside a block, I suggest using an INIT block.my $dbh = DBI -> connect (...);
Abigail
|
|---|