J
John Nurick
I'm trying to understand why 'while ()' behaves like 'while (1)', but
'until ()' doesn't behave like 'until (1)'. So far - maybe because of
clumsiness with perldoc - I can't find it documented.
This compiles and runs without warnings:
while this won't compile:
syntax error at -e line 1, near "; }"
Execution of -e aborted due to compilation errors.
Could someone please point me to an explanation?
TIA
John
'until ()' doesn't behave like 'until (1)'. So far - maybe because of
clumsiness with perldoc - I can't find it documented.
This compiles and runs without warnings:
123456789perl -e "use warnings; while () {$x++; print $x; last if $x==9; }"
while this won't compile:
syntax error at -e line 1, near "() "perl -e "use warnings; until () {$x++; print $x; last if $x==9; }"
syntax error at -e line 1, near "; }"
Execution of -e aborted due to compilation errors.
Could someone please point me to an explanation?
TIA
John