dannoura has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I'm passing a hash and an array to a sub-routine with:
process_article(*WFH, %{$locations{$article}}, @{$lists{$list}});And the sub-routine accepts them with:
my $fh=shift; my (%locations, @keywords)=@_;
The problem is that they somehow get mixed up in the sub-routine. Any way to fix that (without using references)? (yes, I'm using strict).
-----------------------------------
Any comments about coding style are welcome.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problem with passing array and hash to sub-routine
by pzbagel (Chaplain) on Aug 06, 2003 at 07:35 UTC | |
|
Re: problem with passing array and hash to sub-routine
by Skeeve (Parson) on Aug 06, 2003 at 08:08 UTC | |
|
Re: problem with passing array and hash to sub-routine
by PodMaster (Abbot) on Aug 06, 2003 at 07:28 UTC | |
by pzbagel (Chaplain) on Aug 06, 2003 at 07:50 UTC | |
|
Re: problem with passing array and hash to sub-routine
by sgifford (Prior) on Aug 06, 2003 at 18:26 UTC |