Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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. :)

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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2016-08-31 04:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (426 votes). Check out past polls.