Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: @_ still mystifies me

by tadman (Prior)
on Jun 02, 2002 at 22:49 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://171080]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-24 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found