in reply to How to use Perl in web pages?

What do you know about Perl already? If this is your first foray into Perl-country, you will first have to learn Perl.

But to answer your question, yes one can directly embed Perl in web-pages through the use of modules such as Apache2::ASP, although Perl knows a lot of other ways to build dynamic web-pages from CGI via CGI::Application and Catalyst or the use of templating systems such as Template::Toolkit.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: How to use Perl in web pages?
by kitsune (Acolyte) on Jun 06, 2009 at 22:18 UTC

    I have used Perl before, but only for writing simple scripts to execute on my own computer. How much experience in Perl is necessary to use Perl in web pages?

      Actually there is no diference: it is the same Perl and the beauty of Perl is that you can do a lot without having to know all the ins-and-outs of the language. As you get more experienced you will start writing more efficient code of course by using the more advanced (some would say "arcane") constructs and techniques of Perl.

      The basic structure of any Perl script that does "web"-things is easy:

      1. Your script is called by the web-server
      2. In your script you have access to the data of the request (preferably through a module such as CGI or CGI::Simple)
      3. You do something with this data and print the response (that could be as simple as some HTML-code to make a web-page or do some complex processing of form-data and update a database and then output the result as a web-page.
      4. Wash, Lather, Rinse, Repeat

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      How much experience in Perl is necessary to use Perl in web pages?

      A minimum of 42 on the (open-ended) Camel scale ;-)

Re^2: How to use Perl in web pages?
by locked_user SkinnyDee (Initiate) on Jun 09, 2009 at 05:19 UTC
    Good thing there is plenty of help here. That one had me stumped, course I am just learning. Wanted to thank every one for replying.