http://www.perlmonks.org?node_id=835046


in reply to How I Learned About Quines

My first Quine (although I wasn't aware it was called that) was written in C and I went through very much the process you describe. However some languages make it fairly trivial to write a quine. Consider:

seek DATA, 0, 0; print <DATA> __DATA__

Prints:

seek DATA, 0, 0; print <DATA> __DATA__

Adding strictures is left as an exercise (rather a trivial one to be sure) for the reader.

True laziness is hard work

Replies are listed 'Best First'.
Re^2: How I Learned About Quines
by blakew (Monk) on Apr 16, 2010 at 09:04 UTC
    I believe that's called "cheating." :)

    I started out with

    open $fh, '<', $0 or die $!; print while <$fh>;

    which even then felt wrong.