Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
more useful options
 
PerlMonks  

Re: Undocumented variable?

by Zaxo (Archbishop)
on Sep 12, 2003 at 21:36 UTC ( #291195=note: print w/ replies, xml ) Need Help??


in reply to Undocumented variable?

Punctuation variables are exempt from stricture and perfectly legal. AFAIK @$ is not a perl global or package variable, and you are free to use it.

Mostly seen in golf and obfu, for obvious reasons.

After Compline,
Zaxo


Comment on Re: Undocumented variable?
Re: Re: Undocumented variable?
by dmitri (Curate) on Sep 12, 2003 at 22:15 UTC
    golf? What do you mean?
      "Perl Golf" is a game that monks and wizards like to play, wherein you try to come up with the solution to a problem in the fewest characters possible. It often starts from a very basic question, in order to break up the boredom of helping newbies. One can occasionally learn nifty tricks from golfing, but it's mostly just playing.

      Obfu was also mentioned, which is short for obfuscation, or the writing of intentionally hard to read code. Perl's flexibility certainly makes it possible to write extremely obfuscated code (especially when done intentionally) - click on the obfuscation link, probably near the top of this very page, for some nifty examples.

      -- Kirby

•Re: Re: Undocumented variable?
by merlyn (Sage) on Sep 13, 2003 at 13:33 UTC
    AFAIK @$ is not a perl global or package variable
    Actually, the punctuation variables are always forced into package main for hysterical reasons, and are therefore as global (insensitive to current package, and predecalared) as things that use STDIN, STDOUT, STDERR, ARGV, ARGVOUT, ENV, or INC as part of their name.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

      ARGVOUT

      This is a new one for me. What/how is that used?

      Update: Never mind, found it. Though I see I already got a reply, thanks! (and downvotes for an honest question, some people are just too funny ;~) Still, was a new one to me... ah well.


      You have moved into a dark place.
      It is pitch black. You are likely to be eaten by a grue.

        From perlvar (5.8.0):
        ARGVOUT

        The special filehandle that points to the currently open output file when doing edit-in-place processing with -i. Useful when you have to do a lot of inserting and don't want to keep modifying $_. See perlrun for the -i switch.

        Note: While it is mentioned in the Perl documentation prior to version 5.8.0, I have yet to see it explained in such a way.

      >> the punctuation variables are always forced into package main for hysterical reasons

      Is that meant as in "behavior exhibiting overwhelming or unmanageable fear or emotional excess", or just a typo?

      :-) Rudif

        this is also hacker jargon, please see the jargon file entry on this. i don't know if this was deliberate, though.

        daniel.
        Thank you. I'm glad I asked.

        Rudif

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://291195]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (15)
As of 2014-04-16 16:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (433 votes), past polls