Re: check file existence

2003-01-09 Thread LaVei
Alex Cheung Tin Ka wrote: > > Dear All, > I have a problem on using CGI to check the file existence in a directory. Here >is my code > > $workDir = "/usr/local/home/tkcheung/systemadmin/singlesar/Report"; > $path = "tulisar030108.rpt"; > $notAvailabe = 0; ### Must be named $notAvailable :-)

Re: check file existence

2003-01-09 Thread Vitaliy Babiy
Try this unless (-f $a) { $notAvialible = 1 } = "Alex Cheung Tin Ka" <[EMAIL PROTECTED]> wrote in message 021501c2b791$0c935bc0$[EMAIL PROTECTED]">news:021501c2b791$0c935bc0$[EMAIL PROTECTED]... Dear All, I have a problem on using CGI to ch

Re: check file existence

2003-01-09 Thread Rob Dixon
Hi Alex It seems you have a typing error, see in-line. However I don't see how this would cause your problem. I would make sure you have entered your path and file name correctly. (How about copying and pasting directly from a directory listing?) Apart from that, how about writing your code as:

Re: check file existence

2003-01-09 Thread Ramprasad
Alex Cheung Tin Ka wrote: > Dear All, > I have a problem on using CGI to check the file existence in a directory. Here >is my code > > $workDir = "/usr/local/home/tkcheung/systemadmin/singlesar/Report"; > $path = "tulisar030108.rpt"; > $notAvailabe = 0; > $a = qq`$workDir/$path`; > if (