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