in reply to Passing hash to package sub and get it returned ..
Evaluating @_ in scalar context just gives the number of elements, so $temp == 1. You want$temp = @_;
Once you process your hash using the $temp hashref, just return the ref:my $temp = shift; # or my ($temp) = @_;
return $temp;
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing hash to package sub and get it returned ..
by Hofmator (Curate) on Apr 02, 2004 at 09:31 UTC |