http://www.perlmonks.org?node_id=452891

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.