in reply to Print First 3, last 30 lines of input

Saved:

You can do it like so:

my @lines=<DATA>; print @lines[0..2,-30..-1];

...roboticus

Replies are listed 'Best First'.
Re^2: Print First 3, last 30 lines of input
by Saved (Beadle) on Jan 29, 2010 at 11:47 UTC
    Thanx Roboticus. I can "brute force" my way arround, but every so often I long for something more elegent... and always find it here. Thanx to ALL