Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Perl Python Partial Polyglot

by eyepopslikeamosquito (Bishop)
on Nov 23, 2018 at 21:08 UTC ( #1226242=note: print w/replies, xml ) Need Help??

in reply to Perl Python Partial Polyglot

Curiously, in this Stack Exchange Obfuscated Hello World Contest, there were no Perl entries and the winning entry was written in Python -- here's an explanation. Nowadays, it's easy to find examples and tutorials on obfuscated Python.

Python has become more popular than Perl for golf too, as mentioned in The golf course looks great, my swing feels good, I like my chances (Part IV) in the "Which is the Most Popular Golfing Language?" section.

Replies are listed 'Best First'.
Re^2: Perl Python Partial Polyglot
by bliako (Prior) on Nov 23, 2018 at 23:12 UTC

    From the "explanation" you linked above I was impressed by this:

    "o" from the second letter of bool: True.__class__.__name__1

    I thought one can extend this to cause error messages in $! (in Perl), e.g. "No such file or directory" and use single chars from them to try and form an obfuscated string. e.g. perl -e 'open(IN, "<", "");print @{[split(//,$!)]}[8,1,1,10,9,3,6];'

    Have I re-invented the wheel or is this my first obfuscated Perl signature?

    bw, bliako

      I guess ref() would be pretty similar.

      perl -e 'print @{[split //,ref(\$.)]}[-1,-2,0,1,-2,-3]'
Re^2: Perl Python Partial Polyglot
by kschwab (Vicar) on Nov 23, 2018 at 21:10 UTC
    They almost all resort to using lambda though, which I ended up doing also. Not as fun/creative as obfuscated Perl.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1226242]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2020-09-20 18:14 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (122 votes). Check out past polls.