in reply to [emacs] [perl6] how to set mode-compile to respect the shebang
I don't know any "proper" ways of doing it, but defining an execbang script isn't too hard. This should work if you set it to your Perl Command:
#!/usr/bin/perl use strict; use warnings; # use #! from first argument which is a file: my ($file) = grep -f $_, @ARGV; # alternative: use #! from last argument: # my $file = $ARGV[-1]; open my $F, "<", $file or die "Error reading $file: $!"; exec $1, @ARGV if <$F> =~ /^#!(\S+)/; exit 1;
Good Day,
Dean
|
|---|