From: martinahansen Date: Thu, 13 Dec 2012 10:44:37 +0000 (+0000) Subject: fixed minor bug in grab for exact_in where no key would give undef warning X-Git-Url: https://git.donarmstrong.com/?p=biopieces.git;a=commitdiff_plain;h=7527c4f0b2424dc10679912ce89ad92fca83974b fixed minor bug in grab for exact_in where no key would give undef warning git-svn-id: http://biopieces.googlecode.com/svn/trunk@2045 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/bp_bin/grab b/bp_bin/grab index 85063de..ae5b831 100755 --- a/bp_bin/grab +++ b/bp_bin/grab @@ -149,7 +149,7 @@ sub grab_lookup if ( $keys ) { - map { return 1 if exists $lookup_hash->{ $record->{ $_ } } } @{ $keys }; + map { return 1 if $record->{ $_ } and exists $lookup_hash->{ $record->{ $_ } } } @{ $keys }; } else { @@ -158,7 +158,7 @@ sub grab_lookup } if ( not $keys_only ) { - map { return 1 if exists $lookup_hash->{ $record->{ $_ } } } keys %{ $record }; + map { return 1 if $record->{ $_ } and exists $lookup_hash->{ $record->{ $_ } } } keys %{ $record }; } }