Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 chilling in the Monastery: (4)
As of 2014-08-22 23:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (168 votes), past polls