in reply to Re^2: blank lines up to a point
in thread blank lines up to a point
use strict; use warnings; my $firsttime = 1; my $line1 = <DATA>; print neverflop(); $firsttime = 0; my $line2 = <DATA>; print neverflop(); #scalar tell(STDIN); $. = 0; print neverflop(); print neverflop(); sub neverflop { my $statecount = ($firsttime .. 0); ($firsttime .. 0) ? "flip$statecount\t" : "flop$statecount\t"; } __DATA__ line1 line2 line3 __END__ flip1 flip2 flip3E0 flop
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: blank lines up to a point
by ysth (Canon) on Sep 15, 2004 at 15:00 UTC | |
by SpanishInquisition (Pilgrim) on Sep 15, 2004 at 19:04 UTC |