Perl sometimes gets "confused" about line numbers for errors that occur within conditional blocks. E.g., for something like
Unfortunately, I can't reproduce this behavior with some nice example code ATM, so you'll have to take my word. Be that as it may, take a look inside the if-block for problematic code, substitutions in particular. Also, see "Modification of a read-only value attempted" in perldiag for some other suggestions.if ('s' =~ /s/) { # error message may report this line number ... ...; ...; for (qw(q r s t u)) { s{ s }{ t }xms; # ... for error on this line. } ...; ...; } # ... or this line number ...
Give a man a fish: <%-{-{-{-<
In reply to Re: Modification of a read-only value attempted
by AnomalousMonk
in thread Modification of a read-only value attempted
by josthi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |