Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re (tilly) 1 (explain): Quine Whine

by tilly (Archbishop)
on Mar 06, 2001 at 20:09 UTC ( [id://62499]=note: print w/replies, xml ) Need Help??


in reply to Quine Whine

For those who are puzzled by quines, the following page has a good explanation of why they always exist, and exactly how to go about writing one. They are much easier to write in languages which do not require fixed chunks of text, have abundant quoting facilities, are good at string manipulation, and support eval. You will note that Perl has all of these characteristics...

The basic idea is that you have a program that consists of source and data, where the data can be expanded out into source, and also be reproduced as data. Which is why it is nice to now have fixed source that has to be there, is nice to have good ways to quote the data, is nice to be able to manipulate the data, and why it is a bonus to be able to turn data into source and then eval it.

I do urge people to write their own. It is surprisingly easy to do, and the process is very instructive.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2024-03-29 12:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found