Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2016-12-03 20:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (59 votes). Check out past polls.