Created
May 9, 2012 13:45
-
-
Save aklaswad/2644598 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env perl | |
### | |
use strict; | |
use warnings; | |
use 5.10.0; | |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
# perl and coffee dual executable script. # | |
# for perl, take care no triple hash mark in script. # | |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # | |
say "Ladies and gentlemen, I am camel."; | |
my $coffee = do { local $/; <DATA> }; | |
$coffee =~ s/^\#\#\#\n//; | |
say "I got coffeescript from DATA section.\n------\n", $coffee, "--------\n"; | |
__DATA__ | |
### | |
foo = require 'util' | |
console.log "Yo men I'm coffeescript\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment