Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Using 'Shift' in subroutine argument

by GrandFather (Sage)
on Nov 02, 2007 at 18:43 UTC ( #648710=note: print w/ replies, xml ) Need Help??


in reply to Re: Using 'Shift' in subroutine argument
in thread Using 'Shift' in subroutine argument

The shift without an argument defaults to @_.

except in main scope (outside a sub) where shift operates on @ARGV by default. Consider:

perl -e "print shift" wibble

Prints:

wibble

Perl is environmentally friendly - it saves trees


Comment on Re^2: Using 'Shift' in subroutine argument
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (15)
As of 2015-07-31 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls