in reply to print lines from a file

Check out Tie::File, it is part of the core module set. It will allow you to treat a file as an array of lines.

use Tie::File; tie @array, 'Tie::File', filename or die ...; # These are just like regular push, pop, unshift, shift, and splice # Except that they modify the file in the way you would expect push @array, new recs...; my $r1 = pop @array; unshift @array, new recs...; my $r2 = shift @array; @old_recs = splice @array, 3, 7, new recs...; untie @array; # all finished

Ted Young

($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)