The program itself still doesn't run, I removed the main() section, and just opened a file with filehandle DATA, it runs with some errors. So some more clean up is needed.
Your explanation helps, can you give the desired output for that input data? and what output you're getting from the $statgrp (i.e, how you want to extract the output from $stargrp?) I'm a little unsure what you expect for the 409... case (Is the fifth row's 'FF' supposed to be 'FT'?)
Just a remark, while it's interesting to see a real problem in criminal justice, please don't assume we know the terminologies, which is usually the blocking issue for the rest of us. For example, I assume the first column is "statue", the second column is "degree", and third column is "case type". You want a shortest statue and degree combination that determines a case type. Am I right?