in reply to How to write a script that prints its own source code?

That class of programs are called "Quines", for some reason which was unknown to me until I followed that link.

There are some awesome ones on this site, like 3-D Stereogram, Self replicating source., quine madness, spiraling quine, and One-Line Quine for instance. Just type "Quine" in the search box, as I did, and you'll find plenty of examples.

Note that if this is a homework assignment, I really don't recommend using solutions from here. Your teacher may already know about PerlMonks, and a lot of these solutions are pretty well known around here.
--
Mike

Replies are listed 'Best First'.
Re^2: CityCat
by Aristotle (Chancellor) on Sep 17, 2002 at 21:49 UTC
    And even if not, it is likely that the teacher will get suspicious at the proficiency of Perl skill most of these quines required to write.. (And he will likely be able to tell even without knowing Perl particularly well.)

    Makeshifts last the longest.

Re: Re: CityCat
by fglock (Vicar) on Sep 17, 2002 at 20:53 UTC

    Your teacher may already know about PerlMonks, and a lot of these solutions are pretty well known around here.

    Mmmm, maybe they are learning about PerlMonks :)