use warnings;
use strict;
open (TEXT_FILE,'C:\Documents and Settings\rnjenga\sawa3.txt');
my ($line, $nextline);
while ($line = <TEXT_FILE>) {
if ($line =~ /FT\s*\Wnote.+\w+:/){
$nextline = <TEXT_FILE> ;
print ("$line $nextline \n");
}
if ($line =~ /FT\s*\Wnote.+none/){
$nextline = <TEXT_FILE> ;
print ("$line $nextline \n");
}
}
close (TEXT_FILE);
I have written the above code to be able to pull the following results out of the text file.
FT /note="go_function: nutrient reservoir activity [goid
FT 0045735]"
FT /note="none"
Now I need you help to be able to write a code that will copy the BOLD string onto the second one.
I have tried too see if I can be able to skip it during reading the file but to no avail.
Kindly assist.
Thanks and God Bless.