in reply to Hashes and Functions
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! |
|---|
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Hashes and Functions
by gnubbs (Beadle) on Apr 10, 2003 at 18:51 UTC | |
by kelan (Deacon) on Apr 10, 2003 at 19:20 UTC | |
by hmerrill (Friar) on Apr 10, 2003 at 20:10 UTC | |
by dragonchild (Archbishop) on Apr 14, 2003 at 17:02 UTC |