Hi Billy,

can't see anything wrong with the code, except that it assumes that the 
file is in the current directory.  It's not something as daft as you 
'cd'ing to that directory before you ran in debug mode is it?

Gary

On Friday 27 April 2001  3:44 am, Billy Joedono 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". The funny thing is, if I activate the debug
> option (use #!/usr/bin/perl -d) and step through the code, it does
> what I want, no errors given there.
>
> Can somebody points me to the cause of this? Seeing that it works
> when debugged suggests that it is not permission problem, or is it? I
> know it's going to be something simple that I miss. Anyway, I am
> using Red Hat 6.2 and perl 5.005_03.
>
>
> #!/usr/bin/perl
> open (FLT, "once_filter.txt") || warn "can not open filter file: $!";
> while (<FLT>) {
> #  chomp;
>    $Filter= $_;
>    printf "Search filter is $Filter\n";
>
> .... snip ...
>
> }
> close (FLT) || warn "can not close filter file: $!";
>
>
>
> *********************************************************************
>****** Thanks and regards,
>          Billy Joedono
>
>          "Courtesy comes by default, but respect I gotta earn"
> *********************************************************************
>******

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 
    

Reply via email to