Thanks Miles,<br><br>Yeah, I sometimes feel like "You're either with it or against it" when it comes to "use strict;".  And since $:: is kind of a backdoor to get around strict.... Let's just say I'm not a fan ;)<br>
<br>I looked it up and $:: is apparently a shortcut for $main:: .<br>Interesting, but still doesn't tell me why someone would choose to use that syntax.....<br><br>Cheers,<br>Alex<br><br><div class="gmail_quote">On Tue, Aug 16, 2011 at 12:49 PM, Miles Gould <span dir="ltr"><<a href="mailto:miles@assyrian.org.uk">miles@assyrian.org.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">On Tue, Aug 16, 2011 at 11:46 AM, Alex Brelsfoard<br>
<<a href="mailto:alex.brelsfoard@gmail.com">alex.brelsfoard@gmail.com</a>> wrote:<br>
> if ($::var) {<br>
>    ...<br>
> }<br>
<br>
I have never seen this before. Isn't it just referencing a variable in<br>
the package whose name is empty?<br>
<div class="im"><br>
> To my understanding this is a bit messy, and not to mention potentially<br>
> dangerous as it kinda goes against the "use strict;" methodology, does it<br>
> not?<br>
<br>
</div>perl -E 'use strict; $::fred = 7; say $::fred'<br>
<br>
works fine for me! So I guess the point of this scheme is that it<br>
allows you to use global variables (worse, *undeclared* global<br>
variables) under the strict pragma. If that's the case, then my advice<br>
is to dust off and nuke the site from orbit: it's the only way to be<br>
sure. If your budget won't stretch to orbital nukes, then burning it<br>
with fire may be an acceptable workaround.<br>
<br>
HTH,<br>
Miles<br>
<font color="#888888"><br>
Miles<br>
</font></blockquote></div><br>