in reply to Re: Open a file, search for a string and fill a string in another file
in thread Open a file, search for a string and fill a string in another file
my $ldir = "/Android"; $RESULTS_FILE = $ldir.'/'.'results.html'; open OUT, ">>", $RESULTS_FILE; open(IN,"<logcat.txt"); while(<IN>) { chomp; if( $_ =~ m/Unable to parse/ ) { my @string = split('/',$_); print @string; my $stream_name = $string[4]; while $srch(<OUT>) { chomp; if( $srch =~ m/$stream_name/ ) { // How to replace the line here? } } } }
|
|---|