From 88c9e0b80c7466de978791b4c4519a03e2786048 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 18 Apr 2012 07:44:22 +0000 Subject: [PATCH] fixed issue 32 git-svn-id: http://biopieces.googlecode.com/svn/trunk@1797 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/compute | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bp_bin/compute b/bp_bin/compute index 8a58659..6bdb105 100755 --- a/bp_bin/compute +++ b/bp_bin/compute @@ -64,16 +64,16 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) map { $eval_val =~ s/\Q$_\E/$record->{ $_ }/g } @keys; - if ( $eval_val !~ /\s+[+\-\*x]{1,2}\s+/) - { - $record->{ $eval_key } = $eval_val; - } - else + if ( $eval_val =~ /\+|\-|\*|\\/ or $eval_val =~ /\s+x\s+/) { $record->{ $eval_key } = eval "$eval_val"; Maasha::Common::error( qq(eval "$eval_key = $eval_val" failed -> $@) ) if $@; $record->{ $eval_key } = sprintf( $options->{ 'format' }, $record->{ $eval_key } ) if $options->{ 'format' }; } + else + { + $record->{ $eval_key } = $eval_val; + } } else { -- 2.39.5