in reply to Search for a string in a file

Programs of the file → processing → file can easily been written using <>
#!/usr/bin/perl use strict; use warnings; while (<>) { chomp; ...; print ...; }

The program would be used as follows:

perl script.pl infile > outfile

The line is present in variable $_. Check it and skip the print when it's not the value you want.