in reply to Re: Re: Self-printing program
in thread Self-printing program

Well, while this method is neat, note that it is not exactly the same thing as the recursion theorem. You should really understand the recurion theorem, or you'll probably be sorry, in the end.

The simple way to add arbitrary code to a (recursion-theorem-based) quine is like so:

$body = ' $body = %c%s%c; foo(); bar("baz"); printf($body,39,$body,39); '; foo(); bar("baz"); printf($body,39,$body,39);
Note that, when doing it this way (as I mentioned), you end up having to duplicate the code (once to print it, and once to do it).
------------ :Wq Not an editor command: Wq