Hello Robert,

After trying your advise it still didn't write to the file. Went & had
some dinner... came back & it was obvious... Took the while (<CHECK>)
statement out & it worked like a charm.

Whomever says that your stomach & brain aren't connected... is just
wrong... in my case anyway... ;)

Posted the solution in case anybody wanted to know.

Thanks again!

-- 
Best regards,
K.L. Hayes
mailto:[EMAIL PROTECTED]

Wednesday, January 16, 2002, 12:32:06 PM, you wrote:

HR> It looks like you forgot to specify the file handle when printing.

HR> print CHECK "$ENV{'REMOTE_ADDR'}"; }

HR> Rob


HR> -----Original Message-----
HR> From: K.L. Hayes [mailto:[EMAIL PROTECTED]]
HR> Sent: Wednesday, January 16, 2002 6:23 PM
HR> To: [EMAIL PROTECTED]
HR> Subject: Won't write IP address to file


HR> Hello All,

HR> Could somebody please help me figure out why the following code will
HR> not write the IP address to a file?

HR> I've verified that the code can find the file, open it & overwrite any
HR> junk/test data already there with nothing. I've also printed out the
HR> IP address on the previous page using just the print statement.

HR> <CODE>
HR> sub pcheck {
HR>     if (param('pwd') eq $pw ) {
HR>     open  (CHECK,">${path}dmp.dat") || die "Cannot open dmp.dat: $!";
HR>     flock (CHECK, 2) if ($flock);
HR>     while (<CHECK>) {
HR>     print "$ENV{'REMOTE_ADDR'}"; }
HR>     close (CHECK);
HR>     flock (CHECK, 8) if ($flock);
HR>     } else  { &invalid_info; }
HR>     &ad2;
HR> }
HR> </CODE>

HR> All help is appreciated. Thank you for your time.



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

Reply via email to