Of course, I dont know if this is technically a quine, or if it would simply be frowned apon.. I was just sparked by the conversation in previous months about the concept, and figured I'd whip up something as well. Its fairly un-complex, really, but it helped me understand and more importantly -want- to know more about the concept.

#!/usr/bin/perl -w use strict; @_ = <DATA>; foreach (@_){ my @a = split (" "); foreach (@a){ print chr; } } print @_; __DATA__ 35 33 47 117 115 114 47 98 105 110 47 112 101 114 108 32 45 119 10 11 +7 115 101 32 115 116 114 105 99 116 59 10 64 95 32 61 32 60 68 65 84 65 62 +59 10 102 111 114 101 97 99 104 32 40 64 95 41 123 10 9 109 121 32 64 97 32 +61 32 115 112 108 105 116 32 40 34 32 34 41 59 10 9 102 111 114 101 97 99 1 +04 32 40 64 97 41 123 10 9 9 112 114 105 110 116 32 99 104 114 59 10 9 125 1 +0 125 10 112 114 105 110 116 32 64 95 59 10 95 95 68 65 84 65 95 95 10


_14k4 - perlmonks@poorheart.com (www.poorheart.com)

Replies are listed 'Best First'.
Re: Quine on my lunch break
by blakem (Monsignor) on Sep 06, 2001 at 00:20 UTC
    Hey, that's pretty cool. For comparison, here is a quine I wrote while reading _Godel Escher Bach_.
    #!/usr/bin/perl printme(q{ sub printme { print "#!/usr/bin/perl\n\n"; print "printme(q{$_[0]});\n"; print "$_[0]"; } }); sub printme { print "#!/usr/bin/perl\n\n"; print "printme(q{$_[0]});\n"; print "$_[0]"; }

    -Blake