in reply to Re^2: escaping the @ in an interpolating string
in thread escaping the @ in an interpolating string

In the case of those punctuation variables (e.g. $] and $(), Perl interprets "@$]" as "@$" and "]", and since @$ is empty, you get nothing, followed by the punctuation character.
Jeffrey Pinyan (TypeScript, JavaScript, PHP, Perl; in that order nowadays)
@JeffPinyan@NightSkyJeff
Melius servire volo

Replies are listed 'Best First'.
Re^4: escaping the @ in an interpolating string
by raygun (Scribe) on Aug 13, 2024 at 10:00 UTC
    Yeah, I could deduce from the output that it was doing that, but initially I couldn't figure out why it would parse those two differently from the others. But with the light shed by Corion and Danny, I figured it out: $] and $( expand into things that aren't legal variable names. So perl must, upon noticing that, deduce that a symbolic reference is not what it's seeing, and fall back on the alternate parsing you mention.