Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Put it on the symbol table

by cog (Parson)
on Apr 30, 2005 at 17:13 UTC ( #452891=obfuscated: print w/replies, xml ) Need Help??

A bit of symbol table handling:

package _;sub _{$k?',':$"};sub __{for(sort grep!/_/&&$$_,keys%_::){pri +nt"$_$$_"} print"@{[_]}"}$J="u";$/=$s="t";&__;sub ____{for(2,3){&{'_'x$_}}}&___;$ +an="o$/";$ he="r";&____;$P="e";$r="l";&____;$ha="c";$k="er";&__;sub ___{$$_=$,for + keys%_::}

If you want it to be educative, try to understand why I'm using a different package rather than main.

Replies are listed 'Best First'.
Re: Put it on the symbol table
by jdalbec (Deacon) on May 01, 2005 at 02:58 UTC
    Because using main makes the code longer?
    sub _{$k?',':$"};sub __{for(sort grep!/[@_\0-0\@_]|.../&&$$_,keys %::){print"$_$$_"}print"@{[_]}"}$J="u";$/=$s="t";&__;sub ____{for (2,3){&{'_'x$_}}}&___;$an="o$/";$he="r";&____;$P="e";$r="l";&____ ;$ha="c";$k="er";&__;sub ___{$$_=$,for grep!/["\/\$+\"]/,keys%::}
      Surely you mean "using main takes extra code" :-)

      I was aiming, with my comment, for people to remove that part, see what would happen, and try to understand why.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: obfuscated [id://452891]
Approved by ktross
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2017-11-18 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?