Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: shift vs @_

by Fletch (Chancellor)
on Oct 02, 2006 at 18:24 UTC ( #575923=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $foo = "bar";
    sub bad_example { $_[0] =~ s/a/oo/; $_[0] }
    print "\$foo: $foo\n";
    print "bad_example returns: ", bad_example( $foo ), "\n";
    print "uh oh, \$foo: $foo\n";
    
  2. or download this
    sub take_one_and_hash {
      my $one = shift;
    ...
    
      ## frobulate $one based on %hash . . .
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://575923]
help
Chatterbox?
[LanX]: jeez Singapore, Indonesia and the Philippines inherited 3 different kinds of plugs from their former colonial overlords

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2017-02-19 12:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (292 votes). Check out past polls.