in reply to Can someone explain this error?

If you have an error message, please tell Perl to RTFM for you. Add -Mdiagnostics to your command line.
$ perl -Mdiagnostics -e '%foo = 3' ... Odd number of elements in hash assignment at -e line 1 (#2) (S) You specified an odd number of elements to initialize a hash, +which is odd, because hashes come in key/value pairs. $

-- Randal L. Schwartz, Perl hacker