in reply to Re: Re: Re: Re: Correct Loop Structure
in thread Correct Loop Structure

The postfix "if" is called a statement modifier becauses it modifies a statement; you can't use it within an expression like that. The above gets a syntax error.
  • Comment on Re: Re: Re: Re: Re: Correct Loop Structure

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Correct Loop Structure
by parv (Parson) on Jan 30, 2004 at 03:28 UTC

    Well then...

    do { $test = 2 > 1; print 'foo' if $test; $test; } && $index++;

    ...but that is just oogly.