On Jun 14, David Gilden said:
>my ($name,$key,$date) = @_[0..2]
You needn't even use an explicit slice.
my ($name, $key, $date) = @_;
works fine here, and is generally preferred over large amounts of
shift()s.
If you do need to be destructive to @_, then you might want to
splice() it, instead of shift() it forever.
my ($name, $key, $date) = splice @_, 0, 3; # 3 is LENGTH of splice
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, the Winter-Sun.
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** Manning Publications, Co, is publishing my Perl Regex book **