perl asp question 
Author Message
 perl asp question


>The following is my attempted perl port of a VBScript example.  It should
>open a file and display all of its contents.

>$filesys = $Server->CreateObject("Scripting.FileSystemObject");
>$filea = $filesys->OpenTextFile("c:\inetpub\wwwroot\copy.txt");
>$Response->write ($filea->ReadAll);

I've never used ASP, but I don't think your problem is related to it at all.
Try enclosing constant strings in single quotes (') when you don't need
interpolation.  The way you've written it, the file name you try to open
is not what you think it is... ("perldoc perlop" for details).

>Can't call method "ReadAll" without a package or object reference.

That's because you didn't check what OpenTextFile returned to you before
using it.  I'm guessing it's "undef".

>Does someone know what I'm doing wrong.

Well, you are using Micro$oft products...  :-)

Richard Bellavance            |
                              |  "Rien n'est plus imminent que l'impossible."

http://www.*-*-*.com/ ~c{*filter*}/  |

Fri, 22 Dec 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. repost perl asp question (correct e-mail adress)

2. ASP -> PERL Script QUestion..PLEASE

3. Apache::ASP: Trouble opening .asp pages

4. New module ASP::CGI ( ASP.cgi )

5. Question: any ASP parser available?

6. Question: any ASP parser available?


8. ASP+Perl and PerlCon2 submissions - was ASPvsCGI

9. Call Perl from ASP & returning values

10. How to get output from Perl in ASP

11. Activestate Perl, ASP and IIS on Win 2000

12. Accessing Perl modules in VBScript-ASP-pages


Powered by phpBB® Forum Software