http://qs321.pair.com?node_id=667901


in reply to How to read a text file, extract a records that contains a string, export the result into a temporary file

Hi tuakilan, try this

use strict; open(IN,'logfile.txt') or die("cannot open the log file for reading\n" +); open(OUT,'>output.txt') or die("cannot open the output file for writin +g\n");######To create the output file while(<IN>){######to read the input file print OUT "$_" if($_=~/\bTWO\b/i); } close(IN); close(OUT);

Punitha