Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-09-23 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (241 votes), past polls