Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re^5: shift vs @_

by exussum0 (Vicar)
on Oct 06, 2006 at 20:01 UTC ( #576749=note: print w/ replies, xml ) Need Help??

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

Frequently, I use strict and warnings, but there are times I don't. And sometimes prototypes become production code. They get copy pasted by some mad madness. It's possible to also do my $x = @_, which will work w/ strict and warnings.

Unless I have a good reason, I prefer shifts. It's just a preference as defensive programming. 'cause one day, somehow a my $x, $y = @_, and someone will forget to use strict. And I'll be part blame for the assignment, someone else for the warnings and strictness.

Comment on Re^5: shift vs @_

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (15)
As of 2016-05-27 18:45 GMT
Find Nodes?
    Voting Booth?