in reply to How to Print Every Other Line

How about something like:
while (<DATA>) { print $_; <DATA> } __DATA__ 01 02 03 04 05 06 07 08 09 10 11 12

Replies are listed 'Best First'.
Re^2: How to Print Every Other Line
by muba (Priest) on Jun 30, 2004 at 17:57 UTC
    (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.
      ...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