From: martinahansen Date: Tue, 16 Jun 2009 11:56:34 +0000 (+0000) Subject: fixed perl5.10 issue for soft parser X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a5dc879a7ccc2f639633a835417b0853532c2c1a;p=biopieces.git fixed perl5.10 issue for soft parser git-svn-id: http://biopieces.googlecode.com/svn/trunk@535 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_perl/Maasha/NCBI.pm b/code_perl/Maasha/NCBI.pm index 6618092..41f1756 100644 --- a/code_perl/Maasha/NCBI.pm +++ b/code_perl/Maasha/NCBI.pm @@ -318,8 +318,12 @@ sub soft_get_platform { @fields = split "\t", $lines[ $c ]; - $id_hash{ $fields[ $key_hash{ "ID" } ] } = $fields[ $key_hash{ "SEQUENCE" } ] || $fields[ $key_hash{ "ID" } ]; - + if ( defined $key_hash{ "SEQUENCE" } ) { + $id_hash{ $fields[ $key_hash{ "ID" } ] } = $fields[ $key_hash{ "SEQUENCE" } ]; + } else { + $id_hash{ $fields[ $key_hash{ "ID" } ] } = $fields[ $key_hash{ "ID" } ]; + } + $c++; }