in reply to Re^2: help with hash or arrays or hash references
in thread help with hash or arrays or hash references
Here is another way to write that, less typing, fixed to dereference properly ( references quick reference ) , and filtered through perltidy -csc -otr -opr -ce -nibc -i=4
sub Flag { my ( $Subj_id, $proph_prots, $euk_prots, $vir_prots ) = @_; return "Proph", "Phage" if exists $$proph_prots{$Subj_id}; return "Euk", "Euk" if exists $$euk_prots{$Subj_id}; return "Vir", "Phage" if exists $$vir_prots{$Subj_id}; return "Bact", "Bact"; } ## end sub Flag
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: help with hash or arrays or hash references
by AWallBuilder (Beadle) on May 09, 2012 at 12:54 UTC |