XP is just a number | |
PerlMonks |
shifting argumentsby Ea (Chaplain) |
on Aug 22, 2001 at 19:57 UTC ( [id://107004]=perlquestion: print w/replies, xml ) | Need Help?? |
Ea has asked for the wisdom of the Perl Monks concerning the following question:
In my brand spanking new module, I'm trying to read in three
arguments with what I thought was a standard trick of using
shift
sub encode_string ($$$) { my ($reg, $ass, $check) = @_; return join $Delimiter, $reg, $ass, $check; }populates all three scalars, but my ($reg, $ass, $check) = shift;only populates the first one and the other two are undef. Why? Is this something to do with having the sub in a module and me shifting on the wrong list?
Back to
Seekers of Perl Wisdom
|
|