in reply to Re: Re: Simple Encryption question
in thread Simple Encryption question

It depends on how your header and trailer data look like. If they do not start with numerics, then it's easy...
while (<$filehandle>) { tr/blah/blah/ if /^\d{16}/; # do the translation print; # output result }
If your header and trailer look similar to the rest of the data, and if your file is small, you could read everything in to memory first...
my @data = <$filehandle>; print $data[0]; # print first line for (1..$#data-1) { # skip first and last line $data[$_] =~ tr/blah/blah; print $data[$_]; } print $data[-1]; # print last line
Otherwise it will get a bit messy.