in reply to Re^2: Make string that results from split behave like double-quoted string
in thread Make string that results from split behave like double-quoted string
Perhaps what you've actually seen is:
for (my $i = 0, $i < $#arr, $i++) { #corrections ^ ^^ ^ #strictly speaking, the commas instead of semis are merely my preferen +ces do something...; } <br> <c>
because the line you posted won't even compile... whereas the example in this node is basicly a C-style loop, possible written that way to show the counter.
C:\>perl -E "my @arr=qw(foo bar baz);for (my $x = 0; $x < @arr; $x++){ + say $x };" 0 1 2
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Make string that results from split behave like double-quoted string
by protist (Monk) on Aug 23, 2013 at 22:34 UTC | |
by ww (Archbishop) on Aug 24, 2013 at 12:57 UTC | |
by protist (Monk) on Aug 24, 2013 at 22:53 UTC |