I knew that you could use :: to make sure that a package name wasn't used as a subroutine, but I didn't really understand what it did.
$ perl -MO=Deparse -e '$x = anything_could_go_here::' $x = 'anything_could_go_here'; -e syntax OK
Just like single quotes?
TIMTOWTDI I guess...
So we have
q{} '' => :: qw{} - (as in -bareword)
And of course
no strict; $x = bareword;
not to mention
"" and qq{} `` and qx{}
Somebody will tell me that I missed some, I'm sure.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Ways of quoting
by davido (Cardinal) on May 15, 2020 at 21:22 UTC | |
by haukex (Archbishop) on May 15, 2020 at 21:31 UTC | |
by davido (Cardinal) on May 16, 2020 at 01:56 UTC | |
by hippo (Bishop) on May 16, 2020 at 08:41 UTC | |
by tobyink (Canon) on May 17, 2020 at 06:44 UTC | |
| |
Re: Ways of quoting
by LanX (Saint) on May 15, 2020 at 00:30 UTC | |
by Aaronrp (Scribe) on May 15, 2020 at 02:28 UTC | |
Re: Ways of quoting
by kcott (Archbishop) on May 15, 2020 at 07:39 UTC | |
Re: Ways of quoting
by Aaronrp (Scribe) on May 15, 2020 at 00:05 UTC |
Back to
Meditations