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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|