in reply to Making a hash with groups of IDs

Reading the perldsc - Perl Data Structures Cookbook, should help answer part of your question, but I think your pattern matching is confused. Well I can't tell what you're trying to do anyway ;)