Billy Joedono ([EMAIL PROTECTED]) wrote:
> Hi all,
> 
> Below is a piece of code central to my problem. I've used this a lot of 
> time without problem, but on this occasion, it fails me. Whenever I run the 
> script, it ends with the error "bash: ./test.pl: No such file or 
> directory".

That's not a perl problem, the error comes from your shell.  Does your
perl really sit in '/usr/bin/perl' as your she-bang says?

    ---------- sample 1 ----------
    kanku-dai:~$ head -1 check.pl
    #!/usr/bin/perl
    kanku-dai:~$ ./check.pl
    can not open filter file: No such file or directory at ./check.pl line 2.
    can not close filter file: Bad file descriptor at ./check.pl line 11.
    kanku-dai:~$ 
    ---------- sample 1 ----------

Now changing the header:

    ---------- sample 1 ----------
    kanku-dai:~$ head -1 check.pl
    #!/usr/bin/nothing-here
    kanku-dai:~$ !./
    ./check.pl
    bash: ./check.pl: No such file or directory
    kanku-dai:~$ 
    ---------- sample 2 ----------

That's exactly the message you're seeing.  The shell can't find the
specified interpreter.

Are you sure you're not debugging via

    perl -d yourscript.pl

In that case everything works, since your perl is most probably in the
PATH.

-- 
                     If we fail, we will lose the war.

Michael Lamertz          | [EMAIL PROTECTED] / [EMAIL PROTECTED]
    Nordstr. 49          | http://www.lamertz.net
    50733 Cologne        | Work: +49 221 3091-121
    Germany              | Priv: +49 221 445420 / +49 171 6900 310

Reply via email to