in reply to Re^2: help with hash or arrays or hash references
in thread help with hash or arrays or hash references

By chance, are ALL your resulting Flags "Bact"?

You are passing in hash references, but not dereferencing them; thus it seems your IFs will always fail.

Seems to me you should have this:

#if (exists $proph_prots{$Subj_id}){ if (exists $$proph_prots{$Subj_id}){

And so on.