Skip to content

Instantly share code, notes, and snippets.

@aklaswad
Created May 9, 2012 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aklaswad/2644598 to your computer and use it in GitHub Desktop.
Save aklaswad/2644598 to your computer and use it in GitHub Desktop.
#!/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