Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Obfuscated Glob

by RMGir (Prior)
on Aug 21, 2002 at 12:47 UTC ( [id://191790]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Obfuscated Glob

Wow, that's kind of cool. It's useful as an intro to typeglobs, too...

Maybe I like it because I've finally found a JAPH I was able to decode by inspection :)

SPOILER WARNING:

Basically, this sets up sub _, %_, @_, and $_ to point to letters 'h', 'p', 'a', and 'j'. %_ actually maps 'p'=>undef.

$; is then set to a reference to *_, the typeglob for all things named _.

The print line then prints the results of dereferencing that typeglob reference as a scalar ('j'), an array ('a'), a hash ('p' and undef, which is printed as just 'p'), and a subroutine, 'h'.

Very cool...
--
Mike

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://191790]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.