]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed minor bug in grab for exact_in where no key would give undef warning
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 13 Dec 2012 10:44:37 +0000 (10:44 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 13 Dec 2012 10:44:37 +0000 (10:44 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@2045 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/grab

index 85063dec0234c82d30e481b15948fd55fc47ef37..ae5b8315bfe8de8da27412d63edb7b90ece84ea6 100755 (executable)
@@ -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 };
         }
     }