Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Method "do" errorby jsprat (Curate) |
on Apr 20, 2003 at 21:44 UTC ( [id://251886]=note: print w/replies, xml ) | Need Help?? |
Your code declares two lexical variables called $dbh, and each refers to a different variable. The second one masks the first - It's a brand new variable and it is undefined. In the sub, try my $dbh = shift; in place of my $dbh;.
In Section
Seekers of Perl Wisdom
|
|