IMHO, "shift" is the better way to get arguments off of @_. If you start using "shift", you'll never get confused about scalar vs. list context, etc.
So,
my ($cref, $dref) = @_;
becomes
my $cref = shift; my $dref = shift;
Very clean, very easy. No confusion :-)
HTH.
In reply to Re: Re: Re: Hashes and Functions
by hmerrill
in thread Hashes and Functions
by gnubbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |