|Just another Perl shrine|
Re: Surprise: "Can't modify constant item in scalar assignment" [SOLVED]by LanX (Chancellor)
|on Jan 19, 2012 at 16:25 UTC||Need Help??|
> Did you spot it?
Yes, I did!
If you don't, you might want consider using syntax-coloring of variables and an editor which highlights/jumps-to error-lines.
Did you really use strict?
Bareword "message" not allowed while "strict subs" in use at /home/lanx/tmp/tst.pl line 12.
> I would have expected to be notified about the bareword.
IMHO barewords can still be lvalue-subs, where your code has perfectly legal syntax.
runs without problems.
In your case it's a constant bareword.