in reply to escaping the @ in an interpolating string
perl -e '@{q(-e)} = qw(Hello World); print "$0: @$0\n"'
-e: Hello World
If you enable strict, symbolic references are disallowed though:
perl -Mstrict -e '@{q(-e)} = qw(Hello World); print "$0: @$0\n"'Can't use string ("-e") as an ARRAY ref while "strict refs" in use at +-e line 1.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: escaping the @ in an interpolating string
by Danny (Chaplain) on Aug 10, 2024 at 18:56 UTC | |
by marto (Cardinal) on Aug 10, 2024 at 19:27 UTC | |
Re^2: escaping the @ in an interpolating string
by raygun (Scribe) on Aug 10, 2024 at 18:51 UTC | |
by Danny (Chaplain) on Aug 10, 2024 at 19:11 UTC | |
by raygun (Scribe) on Aug 10, 2024 at 19:23 UTC | |
by NERDVANA (Priest) on Aug 10, 2024 at 19:42 UTC | |
by japhy (Canon) on Aug 13, 2024 at 02:33 UTC | |
by raygun (Scribe) on Aug 13, 2024 at 10:00 UTC |