It would operate the same as this, but without the need to re-state the loop variable 3 times:
#! perl -slw use strict; my @a = qw [a b c]; for( $a[7] = 1; $a[ 7 ] <= 5; ++$a[7] ) { print $a[ 7 ]; } print 0 + @a; print "@a"; __END__ C:\test>junk2.pl 1 2 3 4 5 8 Use of uninitialized value in join or string at C:\test\junk2.pl line +10. Use of uninitialized value in join or string at C:\test\junk2.pl line +10. Use of uninitialized value in join or string at C:\test\junk2.pl line +10. Use of uninitialized value in join or string at C:\test\junk2.pl line +10. a b c 6
In reply to Re^2: Hard syntax error or disambiguable parsing?
by BrowserUk
in thread Hard syntax error or disambiguable parsing?
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |