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

One more quine

by mtve (Chaplain)
on Apr 19, 2010 at 11:08 UTC ( #835445=note: print w/ replies, xml ) Need Help??


in reply to How I Learned About Quines

I've started to write uuencoded one, but then I've realized it could be simple:

print unpack'a*@0HX'x2,q 7print unpack'a*@0HX'x2,q 7

Just to save it, here is uuencoded:

print unpack'u@0HXa*@0H',q 3;<')I;G0@=6YP86-K)W5`,$A882I`,$@G+'$@3


Comment on One more quine
Select or Download Code
Re: One more quine
by mtve (Chaplain) on Apr 20, 2010 at 13:51 UTC

    Alphabetic quine

    s sslcsene s sa zs sgxlt print lc for uc sazsslcseneazsazsaazzsazsgxltazprintazlcazforazucaz

    update: fixed for perl 5.8 thanks to choroba

    s ssab x ab ttucte x ab ttab ababt x ab ta btabtgx x print lcs x s ttucte x s tts sst x s ta btstgx x print lc

    Pack ascii quine

    +print pack'h*a*',$x,$x=b2072796e64702071636b67286a216a272c24287c24287d3

    And another printf quine

    printf'%s(%1$s)',q(printf'%s(%1$s)',q)
      perl -e 's sslcsene s sa zs sgxlt print lc for uc sazsslcseneazsazsaazzsazsgxltazprintazlcazforazucaz'

      gives:

      s sslcsene s sa zs sgxlt print lc for uc s sslcsene s sa zs sgxlt print lc for uc

      Which is not the same :(

        Which is not the same :(

        Works for me on 5.10. Nice job mtve!

        --
         David Serrano
         (Please treat my english text just like Perl code, i.e. feel free to notify me of any syntax, grammar, style and/or spelling errors. Thank you!).

        indeed it wont work on 5.8, it's a bug in perl. compare

        print lc, uc for uc abc

        with

        print lc, uc for uc 'abc'

        for now i don't know how to fix it.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2014-09-22 10:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (186 votes), past polls