This may be the rare exception to our rules for posting an effective question. The OP appears not to be seeking help with perl progamming, but rather, seeking a tool (possibly written in perl) to solve his genetics problem. I hope that someone will be able to help him.
Bill
Comment on Re^2: Question for people working with SAM files in genome alignments