in reply to script to grab string from log and print them in a different log

This example shows a regexp that checks for both patterns.
use strict; use warnings; my $out = "Backup/backup.txt"; my $logfile="log.txt"; open LOG, "<$logfile" or die "Cannot open $logfile for read :$!"; open OUT, ">$out" or die "Cannot open $out for write :$!"; /\"_.*\"/ && print OUT $_ while( <LOG> ); close LOG; close OUT;
or if you mean only print what's between the delimiters:
/\"_(.*)\"/ && print OUT "$1\n" while ( <LOG> );

-M

Free your mind