Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 radiator hisses contentedly...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (None)
    As of 2017-09-22 03:50 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      During the recent solar eclipse, I:









      Results (257 votes). Check out past polls.

      Notices?