From: martinahansen Date: Thu, 28 Aug 2008 05:22:35 +0000 (+0000) Subject: fix of \r feature in Fasta::get_entry X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2412e11620087354bedebab2a09947169519c22f;p=biopieces.git fix of \r feature in Fasta::get_entry git-svn-id: http://biopieces.googlecode.com/svn/trunk@228 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_perl/Maasha/Fasta.pm b/code_perl/Maasha/Fasta.pm index 0689de7..cf399cf 100644 --- a/code_perl/Maasha/Fasta.pm +++ b/code_perl/Maasha/Fasta.pm @@ -175,7 +175,7 @@ sub get_entry return if not defined $block; # $block =~ />?([^\n]+)\n/m; - $block =~ /^>?(.+)(\n|\r)/m; + $block =~ /^>?(.+)\n/m; $seq_name = $1; $seq = $'; @@ -183,7 +183,8 @@ sub get_entry chomp $seq; - $seq =~ tr/ \t\n\r//d; + $seq_name =~ tr/\r//d; + $seq =~ tr/ \t\n\r//d; $entry = [ $seq_name, $seq ];