On 10/29/2009 10:46 PM, Ludovic Courtès wrote:
>
> #! /bin/sh
> eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
> if 0;
>
> suggested in perlrun(1)?
>
> Actually that doesn’t work:
Looks like a typo, further down in perlrun(1) there is
#!/usr/bin/perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
and this one is what is used by scripts I have in many /usr/bin Perl
scripts. But the utility of it totally escapes me. Your solution using
perl -x has the advantage of working, so go for it...
Paolo