in reply to Re: Capturing the first and last line of a file ?in thread Capturing the first and last line of a file ?
tie @array, 'Tie::File', $fname or die "Can't tie $fname: $!"; my ($first,$last) = @array[0,$#array]; untie @array; [download]