Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: shift vs @_

by sgifford (Prior)
on Oct 02, 2006 at 20:29 UTC ( #575950=note: print w/ replies, xml ) Need Help??


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

Thanks jimt, I've updated that example to use:

my $self = ref $_[0] ? shift : undef;
which doesn't seem to suffer from the largest of the problems. I've also added some clarifications about when it will and won't work.

As an aside, you would have a very hard time convincing me that this behavior of my and conditionals is anything but a bug in Perl. :)


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2016-02-09 13:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?





    Results (315 votes), past polls