#!/usr/local/bin/perl -w # quine2.p > tmp ; diff quine2.p tmp # declare special characters $q="'" ; $s="\\" ; $v = '#!/usr/local/bin/perl -w # quine2.p > tmp ; diff quine2.p tmp # declare special characters ' ; $w = '$q="\'" ; $s="\\\\" ;' ; $x = '# End of program # Here we print out the top lines print "$v\n$w\n\$v = $q$v$q ;\n" ; # then the special characters $_ = $w ; s/$s$s$s$s/$s$s$s$s/ ; s/$q/$s$q/ ; print "\$w = $q$_$q ;\n" ; # then the program itself print "\$x = $q$x$q ;\n$x\n" ;' ; # End of program # Here we print out the top lines print "$v\n$w\n\$v = $q$v$q ;\n" ; # then the special characters $_ = $w ; s/$s$s$s$s/$s$s$s$s/ ; s/$q/$s$q/ ; print "\$w = $q$_$q ;\n" ; # then the program itself print "\$x = $q$x$q ;\n$x\n" ;