Skip to content

Instantly share code, notes, and snippets.

@kentfredric
Created November 16, 2011 17:08
Show Gist options
  • Save kentfredric/1370681 to your computer and use it in GitHub Desktop.
Save kentfredric/1370681 to your computer and use it in GitHub Desktop.
stupid filehandle tricks
seek*DATA,0,1-open*STDIN,'<&=DATA';print"^_^\n";exec'perl -x';__DATA__
#!/usr/bin/env python
lah de
magical code dah
#!perl
print "Not as magical as you think\n";
seek*STDIN,0,0;exec'perl'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment