http://www.perlmonks.org?node_id=1003457


in reply to [SOLVED]substitution using hash issue

Hi jaffinito34,

Looks like the month numbers are being interpreted as octal. Drop the leading zeroes, especially for 'Aug' and 'Sep'.

'Jan' => 1, ...

That will at least get your program running.

Replies are listed 'Best First'.
Re^2: substitution using hash issue
by jaffinito34 (Acolyte) on Nov 12, 2012 at 15:22 UTC

    Got compilation errors.

    syntax error at ./dateWork line 13, near "+=>" Execution of ./dateWork aborted due to compilation errors.

      Sorry it works, but when I try to print the updated $month, it just prints a blank line.