in reply to more date conversion happiness, part 3

The leading 0 indicates the numbers are octal, but 8 and 9 are not legal octal digits, octal digits are 0..7. So put 01 .. 09 in "" or ''.

Also according to your comments, your print statement should be:

print "$months{$outputdates[0]} $outputdates[1], $outputdates[2]\n";

Update:

In my original post, I only mentioned to put 08 and 09 in quotes, as direct answer towards the issue that the OP got illegal octal digit. But CountZero convinced me that, it could be misleading. so I changed it to 01 .. 09, for completeness.

Thanks CountZero for his pursuit of perfection.

Replies are listed 'Best First'.
Re: Re: more date conversion happiness, part 3
by CountZero (Bishop) on Jan 11, 2004 at 22:16 UTC
    In order to keep the leading 0, you have to single quote all numbers which start with a zero or the hash will not work. We are working with strings here and not with numbers (octal or other).

    Update: As PG told me, single or double quotes are both OK.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law