in reply to
Re: How to Print Every Other Line
in thread
How to Print Every Other Line
(ahem) The original poster only wants the odd lines (1, 3, 5 etc) printed, lol.
Update:
instead of saying 'you should read better', I should read better. I'm sorry.
Comment on
Re^2: How to Print Every Other Line
Replies are listed 'Best First'.
Re^3: How to Print Every Other Line
by
thor
(Priest)
on Jun 30, 2004 at 18:09 UTC
...and that's what (s)he gave. By calling the <DATA> in the loop, (s)he is taking a line and throwing it away. So, in essence, you're reading two lines and printing one.
thor
[reply]
In Section
Seekers of Perl Wisdom