Click to See Complete Forum and Search --> : An interesting question...fancy it jeff?


Scriptage
08-12-2003, 01:16 PM
Is there a way to get the source of a perl document on a web server without executing the file? For instance, LWP::Simple qw(get); only returns the value that the CGI program outputs. I need a way to get the actual perl source.
Thanks in advance.

Jeff Mott
08-12-2003, 06:33 PM
If you are on the same server as the script then yes (via open). Otherwise no.

pyro
08-12-2003, 11:16 PM
On other servers would it then return the output of the file?

Jeff Mott
08-13-2003, 06:30 AM
What you can retrieve over the Web is only what any particular Web server will give you. In the case of a CGI script (assuming it is configured to run correctly), if a request is sent for a CGI script, the Web server will return the output of that script, not the script itself.

It's the same as trying to retrieve the source of a PHP page, Pyro.

pyro
08-13-2003, 06:57 AM
Originally posted by Jeff Mott
It's the same as trying to retrieve the source of a PHP page, Pyro. That is what I was curious about. I figured it would be. Thanks... :)

Scriptage
08-13-2003, 08:46 AM
cheers for the help,
I thought as much ;)