try change this line;
                open( LOG, "c:\MsgLog.txt" ) or die "Can not open file";
to
                open(LOG,"C:\\MsgLog.txt") || die "Cannot open file.\n";

I think you need to escape your backslash.
Try putting the filename in a variable and print it out.  eg. $filename =
"C:\\file.txt"; or $filename = 'c:\file.txt';

play with quoting and excapting.  you'll get it.

hth

t0by

> -----Original Message-----
> From: Melvin Bernstein [SMTP:[EMAIL PROTECTED]]
> Sent: 13/09/2000 3:11
> To:   [EMAIL PROTECTED]
> Subject:      Basic ASP/PerlScript Issue
> 
> Using an ASP file, I can not seem to open a text file residing on my
> local workstation, running NT4.0 and ActiveState Perl (just upgraded to
> current version).   The basic code runs fine when executed from a *.pl
> file without the ASP stuff.   I have tried using both a fully-qualified
> physical path name and the file name itself but both fail.  I have
> checked file permissions, adding IUSR_MyMachineName to the list of users
> having file access ("Everyone" has full control).  Here is the browser
> output:
> --------------------------------------------------------------------------
> --------------------
> 
> hello
> $i=0; open( LOG, "c:\MsgLog.txt" ) or die "Can not open file"; error
> '80004005'
> 
> Can not open file.
> --------------------------------------------------------------------------
> --------------------
> 
> Here is part of the code:
> 
> <%@Language=PerlScript %>
> 
> <% #File:  logon_freq.asp %>
> 
> <%
> $Response->write("hello");
> 
> $i=0;
> open( LOG, "c:\MsgLog.txt" ) or die "Can not open file";
> while (<LOG>){
>  chomp;
>  $i++;
>  $Response->write($i);
>  $Response->write($_);
>  if (/goToPage/){
> 
>   ($ID) = /ID\: (.*)/;
>   $Response->write( "$ID");
>   $freq{$ID}++;
>  }
> }
> 
> close( LOG );
> 
> 
> 
> 
> --
> Melvin S. Bernstein
> FiNet.com
> Web Development Group
> Voice:  510-482-8395
> 
> 
> _______________________________________________
> Perl-Win32-Web mailing list
> [EMAIL PROTECTED]
> http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web

Reply via email to