Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Perl Script Download

by fmogavero (Monk)
on Jun 29, 2001 at 23:21 UTC ( [id://92769]=perlquestion: print w/replies, xml ) Need Help??

fmogavero has asked for the wisdom of the Perl Monks concerning the following question:

Is there any way to download a perl script that generates HTML on the web?

For example, in Netscape you can hold the shift key, click on a link and you will download the Page to your local machine. You can then look at the HTML code in your editor. Does this work for *.pl pages too?

I would like to learn about Perl scripts used on the web. I would love to examine the code that generates the Monastery Gates. I think that I could learn a lot.

Replies are listed 'Best First'.
Re: Perl Script Download
by andreychek (Parson) on Jun 29, 2001 at 23:28 UTC
    Neat idea, but it won't work :-) Perl code on the web, when accessed, is run first (via the webserver) -- it's always the output of the Perl code which you will see.. which is typically HTML, in this situation.

    Thats not to say there aren't any good places for Perl code on the web though. There are literally hundreds or thousand of tutorials to assist you in all levels of Perl coding.. many of which were written by people on this site. Might I recommend using the search features here to find them. Good luck!
    -Eric

    Update: Some other resources
  • The Tutorials section in the Monastery
  • One of my favorites, the mod_perl guide. This isn't just about mod_perl though, you can pick up all sorts of goodies from this guide. Everything from usage of various modules, to which styles of coding are the most efficient with memory/speed, to web programming techniques.
Re: Perl Script Download
by VSarkiss (Monsignor) on Jun 29, 2001 at 23:32 UTC
    No, unless the HTTP server is misconfigured, it will send you the result of executing the Perl program rather than the text of the program itself. You may encounter a server that serves up the program text, but that's almost certainly an error.

    That said, if you want to see the brick and mortar that holds the monastery together, scroll to the very bottom of this page and click through to the "Everything Development Company". (No, I'm not going to include the link here. It's on every page. ;-)

    HTH

Re: Perl Script Download
by cLive ;-) (Prior) on Jun 29, 2001 at 23:33 UTC
    How a script is interpreted, depends on the server. You cannot download a script that runs on the server, because it runs remotely and you only see the output of the script.

    If someone puts the source online, it will often be as a text file or, more likely, in a .tar.gz or .zip file. These you can download and view.

    The source code for the engine that powers PerlMonks is available here.

    For other cgi scripts, why not try the monastry's very own Super Search to find sample scripts.

    Good luck.

    cLive ;-)

Re: Perl Script Download
by TheoPetersen (Priest) on Jun 29, 2001 at 23:30 UTC
    No, it doesn't work the same way. But there are any number of sites where you can find example scripts, including this one. Try the documentation for CGI and consider investing in one of the many books on the subject.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://92769]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-25 21:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found