Skip to content

Instantly share code, notes, and snippets.

@alvarow
Created March 3, 2016 15:17
Show Gist options
  • Save alvarow/1c7b6d2b24e1b91e9c79 to your computer and use it in GitHub Desktop.
Save alvarow/1c7b6d2b24e1b91e9c79 to your computer and use it in GitHub Desktop.
Embedded perl script in shell
!#/bin/bash
cat > embedded_perl_script<<'EOF'
#!/usr/bin/perl -w
$input = $ARGV[0];
my $argc;
$argc = @ARGV;
print $input."\n"
EOF
perl embedded_perl_script first-param
rm embedded_perl_script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment