On Wed, 12 Feb 2003, Andy Wardley wrote:

> I'm at a loss.  This script works fine:
>
>    #!/usr/bin/perl -w
>    print "good\n";
>
> and this script is broken:
>
>   #!/usr/bin/perl
>   print "bad\n";
>
> I can run the first as './good.pl' but if I run the second as './bad.pl'
> I get:
>
>   bash: ./bad.pl: bad interpreter: No such file or directory
>
> If I add a flag (e.g. '-w') on the end of the shebang line, then everything
> is OK.  I can run either script as 'perl xxx.pl' and they work just fine.
>
> I checked this out on two different boxes.  It worked as expected on a
> FreeBSD but was borken on my RedHat Linux machine.
>
> What am I missing?
>

I had this one recently... turned out to be a windows linefeed at the end
of the hashbang.

Don't know if it's just me.

I've created scripts with/without arguments on RH 7.2 and .3, never had a
problem. Unless this is a RH 8.0 issue.

-CT


Reply via email to