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;
In reply to Re: Passing arrays in subs
by ahmad
in thread Passing arrays in subs
by speedyshady
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |