Don't ask to ask, just ask | |
PerlMonks |
Re^2: shift vs @_by jasonk (Parson) |
on Oct 02, 2006 at 19:41 UTC ( [id://575934]=note: print w/replies, xml ) | Need Help?? |
Now if you just mean why not always use the my( $a, $b, $c ) = @_; form vice shift: there's times when you want to pull off some items and then do something list-y with the remaining contents of @_. Best example off the top of my head would be something that builds a hash from key/value pairs like: Another good example is subclassing...
In Section
Seekers of Perl Wisdom
|
|