I a Perl newbie. I want to pass $dbh to a function and it works, but only when $dbh is passed along with another variable; then it failes with Can't call method "disconnect" without a package or object reference at [script_name] line 27.
I have uploaded a MWE to here.
Can anyone tell me why? Why does it not work in both cases?
In reply to $dbh could not be passed to function unless another variable is also passed by tukusejssirs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |