use strict; use warnings; my $firsttime = 1; my $line1 = <DATA>; print neverflop(); $firsttime = 0; my $line2 = <DATA>; print neverflop(); scalar tell(STDIN); print neverflop(); print neverflop(); sub neverflop { ($firsttime .. 0) ? "flip" : "flop"; } __DATA__ line1 line2 line3 __END__ Output: flipflipflipflop
In reply to Re^2: blank lines up to a point
by ysth
in thread blank lines up to a point
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |