Skip to content

Instantly share code, notes, and snippets.

@tantalor
Created January 27, 2011 01:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tantalor/797854 to your computer and use it in GitHub Desktop.
Save tantalor/797854 to your computer and use it in GitHub Desktop.
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