Beefy Boxes and Bandwidth Generously Provided by pair Networks Russ
P is for Practical
 
PerlMonks  

Re: Format quine (slightly obfu)

by pmonk4ever (Friar)
on Dec 03, 2009 at 18:08 UTC ( #810900=note: print w/ replies, xml ) Need Help??


in reply to Format quine (slightly obfu)

bv,

Ok, the output I get in Windoze Perl 5.10.0 is that the file prints. Is that correct?

I'd think not, based on the format it= line. I have just begun to peruse these delightful nodes and can get some of them to run ok here at $work, but it's clear that I'll have to run some of these @ $home to get the full effect!

Thanks for the fun code!

pmonk4ever

"No trees were harmed in the creation of this node. However, a rather large number of electrons were somewhat inconvenienced."


Comment on Re: Format quine (slightly obfu)
Download Code
Re^2: Format quine (slightly obfu)
by bv (Friar) on Dec 04, 2009 at 00:13 UTC

    Thank you! You're correct in that it prints out itself. It's not strictly a true quine, since it reads in its own file, but fun nonetheless. Read on for a breakdown of how it works:

    Hope that helps!


    @_=qw; Just another Perl hacker,; ;$_=q=print "@_"= and eval;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (10)
As of 2014-04-23 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (557 votes), past polls