You're tripping over a scoping issue thanks to declaring your variable inside your if blocks.
Declaring my $New_mo = ""; before your ifs and removing my from all the assignments in the ifs will fix your problem.
However, there's a much simpler solution to be had using arrays and indicies...
my @months = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ); my $new_mo = $months[$month];
Update: D'oh ... can't believe I missed the whole =/== thing! Don't I feel silly...
--k.
In reply to Re: Converting output from numeric values to text
by Kanji
in thread Converting output from numeric values to text
by OnTheEdge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |