Perl: the Markov chain saw | |
PerlMonks |
Re^2: Error: Can't use string as a hash refby Nocturnus (Beadle) |
on Apr 22, 2012 at 06:55 UTC ( [id://966439]=note: print w/replies, xml ) | Need Help?? |
At first, thanks for the hint. Of course, all of my scripts usually start with
But I have stripped out as much as possible to boil the example down to the really important things. In this case, the important thing is that the occurrence of an error message does not depend on using strictures or not (and thus the many documents I found on the web don't apply to my problem), but on the
line. So I got an error message even without using strictures. But you are right in that the error message changes if I put a
at the beginning of the script. The message is then: Bareword "MyHandler" not allowed while "strict subs" in use at test.pl line 5. Unfortunately, that wouldn't have helped me either. I still wouldn't have known how to solve the problem. But the comment of choroba pointed me to the right direction (see other comment). Thank you very much again, Nocturnus
In Section
Seekers of Perl Wisdom
|
|