Dear all,
I am facing one problem
in my input file there are many Entries which starts from *FIELD * AV (checked the attached file)
I want all the entries in the output file which start from
*FIELD * AV
I have written this programm but its not printing all the entries with *FIELD * AV
Its missing certain entries please correct the programm ond checked sample of attached input file.
#!/usr/bin/perl
open(DATA,'mutationsonly.txt');
# or die("Could not open mutationsonly file.");
open(MYOUTPUT, ">newmutations.txt");
# or die ("could not open newmutations file.");
$/="\n\n";
my @records = <DATA>;
foreach my $record (@records)
{
my $line =~m/^\*FIELD\*\sAV$/;
if ($record =~ m/ ($line) /)
{
print "$record";
}
}
close(MYOUTPUT);
close(DATA);