in reply to
ARGV question
'shift' with no arguments, as is the case here, pops the first item off of '@_'. '@_' is an array of arguments given to the current subroutine so the value assigned to $verbose is dependent on the scope of the line you gave.
Comment on
Re: ARGV question
Replies are listed 'Best First'.
Re^2: ARGV question
by
FunkyMonk
(Bishop)
on Aug 18, 2008 at 21:19 UTC
shift
doesn't just operate on @_. Outside of a subroutine it operates on @ARGV.
[reply]
Re^3: ARGV question
by
Johnny Utah
(Novice)
on Aug 18, 2008 at 21:51 UTC
Now it's clear. Thanks so much for the explanations guys. Especially FunkyMonk - you should be a Perl professor!
Use Kubuntu/KDE/Debian? http://kubuntuway.net
[reply]
In Section
Seekers of Perl Wisdom