in reply to Re: compare arrays numbers
in thread compare arrays numbers
You seem to be editing your post continuously, I hope by the time I submit this the snippet in question won't be outdated... although you seem to be adding to your examples, not modifying (apparently you're working on 1,001 ways to write a loop)
In example #2:
What is up with the stray ()? Just a typo, or are you doing something else here (I thought you might be somehow forcing list context, but 0..$#a is a list anyway).$a[$_] -= $b[$_] for (),0..$#a; # ^-- ... why?
Without the spare empty list, the expression evaluates equivalently in my perl (5.10.0).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: compare arrays numbers
by ikegami (Patriarch) on Feb 16, 2010 at 19:13 UTC |
In Section
Seekers of Perl Wisdom