In the sub, try my $dbh = shift; in place of my $dbh;.
In reply to Re: Method "do" error by jsprat in thread Method "do" error by b310