Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re^4: shift vs @_

by tomhukins (Curate)
on Oct 02, 2006 at 20:44 UTC ( #575952=note: print w/ replies, xml ) Need Help??

in reply to Re^3: shift vs @_
in thread shift vs @_

Perhaps, but consider the starting point of one argument:

my( $foo, ) = @_;
compared to:
my $foo = shift;
I use the shift approach because it gives me a clean starting point and lets me extend my methods (or subroutines) easily. Having said that, I try to avoid extending public methods and prefer to create new methods when appropriate. But perhaps I'm drifting away from the original question a little..

Comment on Re^4: shift vs @_
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://575952]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (11)
As of 2015-10-09 21:13 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (252 votes), past polls