in reply to hash confusion

Just as a side note, you may want to add some comments and whitespace to the gigantic unintelligible regex you have there. Read perldoc perlre... what you are looking for is the /x modifier.