"my $var" causes the variable to come into existance after the line containing "my" is executed. Since the "|| die" part is part of the same line, $dbh isn't yet defined.
--
Ryan Koppenhaver, Aspiring Perl Hacker
"I ask for so little. Just fear me, love me, do as I say and I will be your slave."
In reply to RE: my and its use
by rlk
in thread my and its use
by tame1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |