Created
November 25, 2016 20:23
-
-
Save mersanuzun/1a030bc4bbd3b46fe571b5e1ca863bbf to your computer and use it in GitHub Desktop.
Parser script about taxonomy id and name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $filename = 'speclist.txt'; | |
my $write_file = "parsed_taxonomy_id.txt"; | |
open(IN, '<', $filename) | |
or die "Could not open file '$filename' $!"; | |
open(my $out, ">", $write_file) | |
or die "Could not open file $write_file"; | |
while(<IN>){ | |
if ($_ =~ /(\d+)\:\sN=(.*)/){ | |
print $out "$1|$2\n"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment