in reply to Converting output from numeric values to text

Your immediate problem is that "my" creates a _new_, _lexical_ $New_mo in each of your if blocks. $New_mo reverts to its old value once you exit the block.

You'd have to write this, instead:

my $New_mo; # ==, not = if ($Month == 0) { # no my! $New_mo = 'Jan'; } if ($Month == 1) { $New_mo = 'Feb'; } # ...
An even better approach would be to create an array of month names, and use the $Month value as an index into that array, as the perldoc -f localtime entry would show you.
my @monthNames=qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); my $New_mo = $monthNames[$month];
Make sense?
--
Mike

(Edit: Use == instead of =)

(Edit again: I was SURE perldoc -f localtime used that as an example...)