Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Is perl a good choice for CGI ?

( #16384=categorized question: print w/ replies, xml ) Need Help??
Contributed by Zombie xander on Jun 05, 2000 at 15:22 UTC
Q&A  > CGI programming


Description:

I want to write code to interact with web pages using cgi scripts (a few fields to enter and a button to press for submitting). I've done a reasonable amount of C++ and Perl programming, but nothing internet related before. Any pointers to relevant help sources would be very appreciated, all I seem to be getting in my searches is how to do server side stuff, not how to automate the client side or interactions with the server.

Answer: Is perl a good choice for ...
contributed by swiftone

The most classic answer is CGI.pm. This is a module that does most of the overhead of interacting with the web. Perl is perfect for CGI programming because such things are so often text-based (one of perl's strengths), require quick development (ditto), and flexibility (yup).

I'd recommend you look at O'Reilly's CGI Programming with Perl as a starting point. It's pretty basic, but thorough.

(CGI is used for receiving input from users, LWP for sending and requesting pages).

If you need to parse a lot of HTML, check out HTML::Parser, and The Perl Journal article about it in the current issue. (pay subscription) (Article is recommended, because the HTML::Parser documentation assumes you know what it does and how)

Answer: Is perl a good choice for ...
contributed by infoninja

I'd also highly reccomend Official Guide to Programming with CGI.pm by Lincoln Stein (the author of CGI.pm) -- it's come in very handy quite a few times.

Answer: Is perl a good choice for ...
contributed by antihec

look into the LWP:: things at CPAN (there's also Bundle::LWP or libwww)...
HTH

Please (register and) log in if you wish to add an answer



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others wandering the Monastery: (10)
    As of 2014-08-21 16:10 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (136 votes), past polls