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 :-)
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
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:
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 (