in reply to Re: while () vs. while (1)
in thread while () vs. while (1)

You seem to have forgotten that statement modifiers don't use parens.

# EXRP while EXPR; print "Here\n" while ();

is the equivalent of

# while (EXPR) { EXPR; } while ( () ) { print "Here\n" }

Both behave identically.

Replies are listed 'Best First'.
Re^3: while () vs. while (1) (while;)
by tye (Sage) on Jan 23, 2011 at 06:17 UTC
    perl -e"warn foo, last while;" syntax error at -e line 1, near "while;"

    - tye