Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: what does shift do?

by mt2k (Hermit)
on May 19, 2002 at 20:21 UTC ( [id://167705]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    use strict;
    ...
    print shift, "\n"; #prints "foobar"
    
    }
    
  2. or download this
    #!/usr/bin/perl
    use strict;
    ...
    print pop, "\n"; #prints "foo"
    
    }
    
  3. or download this
    #!/usr/bin/perl
    use strict;
    ...
    print $params{'-third'}, "\n"; #prints "foobar"
    
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://167705]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-25 06:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found