in reply to [untitled node, ID 193991]
Personally, i opt for something like:
and not bother with shifting individual values.sub foo { my ($bar,$baz,@qux) = @_; # yadda yadda yadda }
UPDATE:
blaze just /msg'ed me with a question (thanks blaze),
so maybe i was not completely clear ... So, you don't know
how many arguments you are going to deal with. You could
always use a for loop like so:
Also, i accidently used $qux, in the first snippet when i meant @qux - erikharrison explains this much better than i can. Out of curiosity Samn, just exactly what are you trying to do?sub foo { print "$_\n" for @_; }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (jeffa) Re: Collecting all values with shift
by cLive ;-) (Prior) on Aug 30, 2002 at 07:20 UTC |