in reply to Re: Hard syntax error or disambiguable parsing?
in thread Hard syntax error or disambiguable parsing?
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
|
|---|