http://qs1969.pair.com?node_id=54214

too bad it only works under windows 98 :-(
$_='%#(/@*(((@!./((%)@+%),@(!#+%)@#/.'^ '@@@@``][\`@@@\@@[`{@[@`@@@@@[~@@@';`$_`

Replies are listed 'Best First'.
Re: !@#$%^&*
by Fastolfe (Vicar) on Jan 25, 2001 at 10:37 UTC
    Here's a version for you (preserving its behavior) that'll work on Unix and Win32.
    $_=('%#(/@*(((@!./((%)@+%),@(!#+%)@'.(($^O^'`.*).dn')eq'-}}@@W\\'? '#/.{o|~{':'o$%-`(*"'))^'@@@@``][\`@@@\@@[`{@[@`@@@@@[~@@@[O\\^[';`$_`
Re: !@#$%^&*
by jaymoo (Novice) on Jan 25, 2001 at 19:44 UTC
    Huh. Just when I think I have a glimpse of the workings of Perl, I find this. Anyone care to point out what makes this one tick?

      This one's fairly simple, actually. There are really only two parts: An assignment to $_ and a back-tick running of $_.

      If you break down the first statement, you'll see it's two strings XOR'd together:

      $_ = '%#(/@*(((@!./((%)@+%),@(!#+%)@#/.' # The encrypted string ^ # XOR '@@@@``][\`@@@\@@[`{@[@`@@@@@[~@@@' # The secret decoder ring

      So this ends up assigning 'echo Just another Perl hacker>con' to $_. The second line, `$_` simply passes that to the shell and runs it, which will work fine on any Win32 system.

        Thanks for the help!
Re: !@#$%^&*
by randomblue (Beadle) on Jan 25, 2001 at 21:36 UTC
    It also works on NT4 and Win2000 with ActiveState Perl 5.6.

    Very cool :) How on earth does it work?

Re: !@#$%^&*
by ColonelPanic (Friar) on Jan 26, 2001 at 07:29 UTC
    Very nice. The best ones are always based one a simple trick.

    When's the last time you used duct tape on a duct? --Larry Wall
Re: !@#$%^&*
by arhuman (Vicar) on Jan 26, 2001 at 18:18 UTC
    This one let me breathless...
    (Even if I'm not skilled I can be admirative, cant't I ?)
    To all of you guys (who created/enhanced/commented it...)

    THANKS !

    Hope I could contribute soon in this area...