in reply to Converting output from numeric values to text
You'd have to write this, instead:
An even better approach would be to create an array of month names, and use the $Month value as an index into that arraymy $New_mo; # ==, not = if ($Month == 0) { # no my! $New_mo = 'Jan'; } if ($Month == 1) { $New_mo = 'Feb'; } # ...
Make sense?my @monthNames=qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec); my $New_mo = $monthNames[$month];
(Edit: Use == instead of =)
(Edit again: I was SURE perldoc -f localtime used that as an example...)
|
|---|