Friday, July 31, 2009

Can you call an ASP (active server pages) program from a PERL script? If so, how?

I need to execute an asp file from a PERL script. I have very, very little PERL skills (enough to be dangerous). Just want to know if it can be done and what the syntax is.





Thanks.

Can you call an ASP (active server pages) program from a PERL script? If so, how?
The short answer is yes. The long answer is, it depends. There are 2 situations: 1. you have full access to webserver, and 2. you do not.





If you do not have full access you can use one of the many perl modules to access a URL directly and get the generated html and "scrape" what you need from that.





If you have full access, you should be able to execute the command just like any other system command and pipe the out put to a variable.





An example might be:





my $status = system("whatever.asp %26gt; tmpfile")





This would run the asp file whatever.asp and redirect the output to the file tmpfile.





Then you would have to open the file, read it and extract whatever info you wanted.


No comments:

Post a Comment