in reply to Stripping Lines out of a File

An alternative that might be simpler to maintain, though more costly to run, is to use Tie::File, which lets you treat a file as an array. You could find the line numbers containing the codes and splice out the appropriate lines.