I think you're fine as far as passing the ref, but there are a couple of other style points that may bite you later.
The reason is that one day you'll forget the parentheses and be surprised at the fact that Perl did not set up @_ separately. (For more details, take a look at perlman:perlsub.)my $pdb = openDatabase(); # ... doSomething(DB => $pdb, FOO => 'bar');
HTH
In reply to Re: lifetime of refs to DBI handles passed to sub as hash elements and assigned to scalar within it
by VSarkiss
in thread lifetime of refs to DBI handles passed to sub as hash elements and assigned to scalar within it
by tiaxajeff
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |