John W. Krahn jwkr...@shaw.ca writes:
print Ditching $ditch\n;
$ditch = '';
What is the point of assigning to $ditch if it goes out of scope at
the next line?
I can only ascribe it to deep seated stupidity
What would be the better way to test what the for loop is doing?
--
To
This is probably blindingly simple but I'm not understanding why @ARGV
is not reduced to () (no args)? in this example
I'm trying to understand what happens with ARGV in s getops loop with
arguments after the getopts Options, or any time there is ARGV, I
guess.
Why doesn't the `for loop' reduce
Harry Putnam wrote:
This is probably blindingly simple but I'm not understanding why @ARGV
is not reduced to () (no args)? in this example
To Perl, @ARGV is just another array. It has some special features but
can be assigned values just like other arrays. You can use it to do
tricks, like
HP == Harry Putnam rea...@newsguy.com writes:
HP print Now lets ditch the rest in a for loop\n;
HP for (@ARGV){
change that for to a while. for will create a list of aliases to the
array elements passed to it. it doesn't check its length as you seem to
think. while will loop until @ARGV is
Harry Putnam wrote:
This is probably blindingly simple but I'm not understanding why @ARGV
is not reduced to () (no args)? in this example
[ SNIP ]
print Now lets ditch the rest in a for loop\n;
for (@ARGV){
my $ditch = shift;
perldoc perlsyn
[ SNIP ]
Foreach Loops
[ SNIP ]
The