Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
A perl quine.
#!/usr/bin/perl
my ($q, $n) = ("'", chr(10));
my $s = '#!/usr/bin/perl%smy ($q, $n) = ("%s", chr(10));%smy $s = %s%s%s;%sprintf $s, $n, $q, $n, $q, $s, $q, $n, $n;%s';
printf $s, $n, $q, $n, $q, $s, $q, $n, $n;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment