I have read that perl used to allow pkg'$var and this is still supported
"'" is allowed as an alternate to "::", so $pkg::var could be (very unwisely) written as $pkg'var. Writing pkg'$var could definitely result in the error you get. But I don't see that in the code, so why do you bring it up?
The hashed codes are japanese characters.
No, there are no Japanese characters in the iso-8859-1 character set. You are not giving Japanese characters to perl. Perhaps you meant to include "use utf8;" to indicate your source is encoded using UTF-8 rather than iso-8859-1?