Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

what are some of the most powerful, complex, one-liners?

by f77coder (Beadle)
on Dec 08, 2016 at 03:57 UTC ( #1177475=perlquestion: print w/replies, xml ) Need Help??
f77coder has asked for the wisdom of the Perl Monks concerning the following question:

hello

in general if people could post some hellishly complicated one-liners, I'd like to have a go at trying to figure them out

no perl equivalent of fork bombs, thanks

:(){ :|:& };: or
bomb() { bomb | bomb & }; bomb

Replies are listed 'Best First'.
Re: what are some of the most powerful, complex, one-liners?
by Athanasius (Chancellor) on Dec 08, 2016 at 06:59 UTC
Re: what are some of the most powerful, complex, one-liners?
by dave_the_m (Prior) on Dec 08, 2016 at 10:59 UTC
    a quine I wrote a few years ago. Note that it uses no punctuation.
    s zzs vvxv and s ZVZchr 122Zie and s ZVZchr 122Zie and s ZVZchr 122Zie and s SxSlcfirstSe and s YZZxZYvvxvYi and print z and s ZVZchr 122Zie and s ZVZchr 122Zie and s ZVZchr 122Zie and s SxSlcfirstSe and s YZZxZYvvxvYi and print

    Dave.

Re: what are some of the most powerful, complex, one-liners?
by tybalt89 (Curate) on Dec 08, 2016 at 04:11 UTC
Re: what are some of the most powerful, complex, one-liners?
by haukex (Monsignor) on Dec 08, 2016 at 07:45 UTC

    Hi f77coder,

    Many of these are not exactly one-liners, but figuring out some of these JAPH scripts (Update: also, super search, or of course) could be fun :-) This one is my relatively simple contribution:

    perl -le "print map+chr 63+oct reverse,reverse+sort+0xbbddcb=~m~..~g"

    There are actually lots of variations on the same principle, so naturally I wrote a generator script, these just a few examples of currently more than 2000 ;-)

    perl -le "print map+chr 22+oct reverse,reverse+sort+0x21a111a=~m~..~g" perl -le "print map+chr 23+reverse,sort+0xe8a8ea=~m~..~g" perl -le "print map+chr -7+reverse,sort+(7*11*0xf7e9b)=~/../g" perl -le "print map+chr 59+oct reverse,reverse+sort+(5*7*94_61*3**3*2* +*3)=~/../g"

    Regards,
    -- Hauke D

      Thank you.
Re: what are some of the most powerful, complex, one-liners? -- oneliner
by Discipulus (Monsignor) on Dec 08, 2016 at 15:03 UTC
      Thanks for the comments, i can bang out bash one liners but perl is a different beast, especially ones with hellishily complicated maps.
Re: what are some of the most powerful, complex, one-liners?
by ExReg (Curate) on Dec 08, 2016 at 15:22 UTC
Re: what are some of the most powerful, complex, one-liners?
by Phenomanan (Monk) on Dec 08, 2016 at 14:12 UTC

    Why not just go to the Obfuscation page here on Perlmonks? There is plenty of insane code to try and crack there, although they are not necessarily one liners.

    Check it out: Obfuscated Code

      Thanks, I'll have a look but intentionally obfuscated code is an order of magnitude harder it seems, I only want to look at shortened, compact code. Obfuscation is like adding an encryption layer, I'm not ready for that yet but thanks.
Re: what are some of the most powerful, complex, one-liners?
by shawnhcorey (Friar) on Dec 08, 2016 at 14:27 UTC
    perl -plE'$_=eval'
Re: what are some of the most powerful, complex, one-liners?
by jdporter (Canon) on Dec 12, 2016 at 21:07 UTC

    Just pick the most powerful module you know and invoke it as a one-liner. Just for one (not real great) example: Maypole::HTTPD:

    perl -MMaypole::HTTPD -e 'Maypole::HTTPD->new(module=>"BeerDB")->run() +'
    I reckon we are the only monastery ever to have a dungeon stuffed with 16,000 zombies.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1177475]
Approved by betterworld
help
Chatterbox?
[Discipulus]: śledzie!! the only sweet my father in law eat

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-11-21 11:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (297 votes). Check out past polls.

    Notices?