[tpm] grabbing 2 input params at a time?

Fulko Hew fulko.hew at gmail.com
Wed Apr 16 16:12:18 PDT 2008


Sorry, my brain has gone on vacation...

Whats the easiest way to grab two parameters at a time, that were passed
into a subroutine?

ie.

mysub('a', 1, 'b', 2, 'c', 3);

sub mysub {
   while (@_) { push @letters, shift; push @nums, shift; }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/toronto-pm/attachments/20080416/8820bfa6/attachment.html 


More information about the toronto-pm mailing list