Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: @_ still mystifies me

by tadman (Prior)
on Jun 02, 2002 at 22:49 UTC ( #171080=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Unfortunate scalar conversion
    my @foo = @_ || @bar;
    
    # Unfortunate error, not DWIM-compatible
    my @foo = @_;
    @foo ||= @bar;
    
  2. or download this
    my @bar = qw[ dog cat frog ];
    
    sub foo 
    ...
    
            print join(',', @foo),"\n";
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2014-12-25 01:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls