|Pathologically Eclectic Rubbish Lister|
Re: Obfuscated Globby RMGir (Prior)
|on Aug 21, 2002 at 16:47 UTC||Need Help??|
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 :)
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'.