Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 scrutinizing the Monastery: (5)
As of 2015-07-06 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls