in reply to Change number into month

There's shouldn't be a loop in the sub month. In fact, something is obviously wrong since $damonth isn't used. Just replace
&month;
with
$month = $mon{$damonth};
or maybe
$month = $mon{0+$damonth};
for it to work.

I'm wondering what you aren't using an array:

my @mon = qw( January Feburary March April May June July August September October November December ); ... $month = $mon[$damonth-1];

And please put <code> tags around your code when you post here. It makes your code easier to read, and you don't have to add a bunch of <br> tags or escape stuff like <.