in reply to Text Processing

Here is another approach not using seek. (Untested)
open (INFILE, $infile) || die "but... $!"; open (OUTFILE, ">$outfile") || die "but... $!"; my @hold; while(<INFILE>){ if ($. < 12){ push @hold, $_; next; } if ($. == 12){ # grab some data from the 12th line # perform some funky manipulation on it print OUTFILE "new funky data from 12th line"; print OUTFILE @hold; next; } print OUTFILE $_; }

see perlman:perlvar

TIMTOWTDI :)

--
my $chainsaw = 'Perl';