On Thu, May 31, 2001 at 01:00:49AM -0500, Nichole Bialczyk wrote:
> i'm trying to write a log file and i can't seem to open it to write to. the file 
>does exist. here is the code for opening the file:
> 
> if(! open(LOG, ">xxx.txt)) {
>    print "Content-type: text/html\n\n";
>    print "Can't open xxx.txt\n";
>    exit;
> }
> print LOG "At $date, $ENV{'REMOTE_HOST'} etc., etc.

I'd suggest putting $! in your output, to better figure out why you can't
open the file.

For example:

    if (! open(LOG, ">xxx.txt")) {
        print "Content-type: text/html\n\n";
        print "Can't open xxx.txt: \l$!.\n";
        exit;                    # ^^^^
    }


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to