when i put in the $! i get the error message Permission denied. i also tried
to do it the standard way with the open...or die... statement, but then i
got an internal server error 500. sometimes i think it's better to write
your own code than to modify existing code. grrrrrrrrrrrrr....
i really appreciate everyone's help. maybe one day i can aspire to be a
guru! :)
----- Original Message -----
From: "Michael Fowler" <[EMAIL PROTECTED]>
To: "Nichole Bialczyk" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, May 31, 2001 1:17 AM
Subject: Re: writing to a text file
> 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
> --
>