in reply to $dbh could not be passed to function unless another variable is also passed
Your pastebinned code includes this line:
my $dbh = @_; # Case #2
This almost certainly doesn't do what you want as it enforces scalar context. Use list context instead:
my ($dbh) = @_; # Case #2
See the Context tutorial for more on this. In future, please include your code in the question (enclosed withing <code> ... </code> tags) rather than a transient off-site link.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: $dbh could not be passed to function unless another variable is also passed
by tukusejssirs (Beadle) on Aug 08, 2019 at 13:14 UTC | |
by hippo (Archbishop) on Aug 08, 2019 at 13:23 UTC | |
by tukusejssirs (Beadle) on Aug 08, 2019 at 14:01 UTC | |
by Corion (Patriarch) on Aug 08, 2019 at 14:09 UTC | |
by tukusejssirs (Beadle) on Aug 08, 2019 at 14:53 UTC | |
| |
by Fletch (Bishop) on Aug 08, 2019 at 14:11 UTC |