my $href = @_;
Evaluating an array as a scalar returns the number of elements in the array, so at this point $href contains '1'. You want either my($href) = @_; or my $href = shift;, or something similar that will maintain the array context you are looking for.
| We're not surrounded, we're in a target-rich environment! |
|---|
In reply to Re: Hashes and Functions
by jasonk
in thread Hashes and Functions
by gnubbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |