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
In reply to Re: use strict ans begin
by Abigail-II
in thread use strict and begin
by tsvik_t
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |