Skip to content

Instantly share code, notes, and snippets.

@mersanuzun
Created November 25, 2016 20:23
Show Gist options
  • Save mersanuzun/1a030bc4bbd3b46fe571b5e1ca863bbf to your computer and use it in GitHub Desktop.
Save mersanuzun/1a030bc4bbd3b46fe571b5e1ca863bbf to your computer and use it in GitHub Desktop.
Parser script about taxonomy id and name
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