Here are some random hint/tips that might not be directly for the core question, but will help in general:
- Your creation of %mon will work just fine, but it's general practice to use the => in place of some of the commas in order to explictly denote the key => value nature of the relationship. (But as already noted, an array is probably better here anyways.)
my %mon = ( 1 => 'January', 2 => 'Feburary', 3 => 'March', 4 => 'April
+', 5 => 'May', 6 => 'June', 7 => 'July', 8 => 'August', 9 => 'Septemb
+er', 10 => 'October', 11 => 'November', 12 => 'December');
I had some other comments/tips, but the original post/code has been accidentally overwritten.. I'll follow-up if/when it's restored.