in reply to Passing arrays in subs
Well, I think you're doing just fine ... If you want to use a reference as suggested, then that's fine ... if you don't want to .. it's up to you.
A simple fix to your code requires changing 2 lines only
Not Tested, but should work#Change my $sItem = @_; my $nItem = @_; # to my $sItem = pop @lsList; my $nItem = pop @lsList;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing arrays in subs
by lostjimmy (Chaplain) on Jul 30, 2010 at 18:38 UTC | |
by ahmad (Hermit) on Jul 30, 2010 at 19:20 UTC | |
|
Re^2: Passing arrays in subs
by speedyshady (Novice) on Jul 31, 2010 at 00:22 UTC |