Created
November 16, 2011 17:08
-
-
Save kentfredric/1370681 to your computer and use it in GitHub Desktop.
stupid filehandle tricks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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