in reply to Converting Uniprot File to a Fasta File in Perl

Hi! You have a few things that could be improved in your Perl (don't use bareword file handles) and a few things in your expression as well:

#!/usr/bin/perl use warnings; use strict; open my $fh, '<', 'uniprotfile' or die "Can't open uniprot file: $!"; while (defined(my $line = <$fh>)) { chomp $line; if ($line =~ /^(AC|OS|OX|ID|GN)\s+(.*)/) { print $1, $2, "\n"; } }

Instead of repeating yourself in the expression, simplify it a bit.