Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Is perl a good choice for CGI ?

by Zombie xander (Initiate)
on Jun 05, 2000 at 15:22 UTC ( #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


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 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 by Lincoln Stein (the author of -- 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)...

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!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            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?

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

    How do I use this? | Other CB clients
    Other Users?
    Others contemplating the Monastery: (5)
    As of 2020-08-03 13:11 GMT
    Find Nodes?
      Voting Booth?
      Which rocket would you take to Mars?

      Results (27 votes). Check out past polls.