Re: Need to check file

2004-10-15 Thread Luinrandir Hernsen
sigh.. so sorry for not being more exact...
I did use the quotes
if (-e 'filename.dat')

I guess I will have to find out the full path...

Thanks
Lou

- Original Message - 
From: "Bee" <[EMAIL PROTECTED]>
To: "Luinrandir Hernsen" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Thursday, October 14, 2004 4:54 PM
Subject: Re: Need to check file


> > I have successfully checked a file in the same dir ,
> > my question is do I have to chdir when doing a
> > if (-e filename.dat)
>
> I don't think you will get success without a quote for 'filename.dat'.
> It could be the return value for sub filename concating sub dat, be
> nothing.
>
> >
> > I tried looking for files in other dirs using
> > if (-e .../html)
> > etc.. but with no success.
>
> By giving the full path ( not url ) of the file, you will get your job
done
> without chdir.
>
> HTH,
> Bee
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Re: Need to check file

2004-10-14 Thread Bee
> I have successfully checked a file in the same dir ,
> my question is do I have to chdir when doing a
> if (-e filename.dat)

I don't think you will get success without a quote for 'filename.dat'.
It could be the return value for sub filename concating sub dat, be
nothing.

> 
> I tried looking for files in other dirs using 
> if (-e .../html)
> etc.. but with no success.

By giving the full path ( not url ) of the file, you will get your job done
without chdir.

HTH,
Bee


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Need to check file

2004-10-14 Thread Luinrandir Hernsen
I have successfully checked a file in the same dir ,
my question is do I have to chdir when doing a
if (-e filename.dat)
and then change back to the cgi-bin dir?

www.mysite.com/cgi-bin is where my perl files are.
www.mysite.com/html is where the file I want to check is.

chdir "/html";
if (-e filename.html)
{print qq|File Found|; }
else {print qq|File NOT found|;}
chdir"/cgi-bin";

I tried looking for files in other dirs using 
if (-e .../html)
etc.. but with no success.


do I make sence?
Lou

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]