Skip to content

Instantly share code, notes, and snippets.

@aklaswad
Created May 9, 2012 13:51
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/2644637 to your computer and use it in GitHub Desktop.
Save aklaswad/2644637 to your computer and use it in GitHub Desktop.
#!/usr/bin/env perl
1 // <<X;
/*
X
use strict;
use warnings;
use 5.10.0;
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# perl and node dual executable script. #
# for perl, take care no star-slash "\*\/" in script. #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
say "Ladies and gentlemen, I am camel.";
my $js = do { local $/; <DATA> };
$js =~ s!^\*\/\n!!;
say "I got JavaScript from DATA section\n------\n", $js, "--------\n";
__DATA__
*/
console.log('Yo men, I am JavaScript!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment