in reply to Search for a string in a file
#!/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.
|
|---|