in reply to Re: Help with perl syntax
in thread Help with perl syntax
However, in Perl you're forced to write that in two pieces somehow:print $_ if $_ % 2 while <INPUT>; # not legal in Perl, but in pseudo-B +ASIC-PLUS
or$_ % 2 and print $_ while <INPUT>;
I believe Larry thought the nested stacked suffix operations were hard to parse, and I agree with him.while (<INPUT>) { print $_ if $_ % 2 }
-- Randal L. Schwartz, Perl hacker
|
|---|