I was going to try to explain the reason for this feature, but then I thought, I bet it's in the documentation for the error message.
`perldoc perldiag`
In string, @%s now must be written as \@%s
(F) It used to be that Perl would try to guess whether
you wanted an array interpolated or a literal @. It
did this when the string was first used at runtime.
Now strings are parsed at compile time, and ambiguous
instances of @ must be disambiguated, either by
prepending a backslash to indicate a literal, or by
declaring (or using) the array within the program
before the string (lexically). (Someday it will
simply assume that an unbackslashed @ interpolates an
array.)
So, the reason for this error message is to flag a change in the implementation that will be incompatible with earlier versions of Perl. |