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

General quine

by ambrus (Abbot)
on May 19, 2009 at 19:12 UTC ( #765005=obfuscated: print w/replies, xml ) Need Help??

print+("print+(","\"",",","\\",")[g1012131121212133121414=~/./g]")[g10 +12131121212133121414=~/./g]

Update 2012-12-12: see also Short quines, How I Learned About Quines.

Replies are listed 'Best First'.
Re: General quine
by mtve (Deacon) on May 20, 2009 at 13:56 UTC

    inspired:

    print$`,$`,q(print$`,$`,q(1)=~1,$',$')=~1,$',$'

    or a bit shorter

    print$`,$_=q(print$`,$_=q( ),$' x/ /),$' x/ /

    update: more regex quine

    print q(print q(1)=~/((\D+)|.)/g)=~/((\D+)|.)/g

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2018-02-20 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (266 votes). Check out past polls.

    Notices?