You can write CGI in any (for varying values of 'any') language. But with Activestate Perl, you can write your ASP in Perl, if you wish. I find that most Perl people are Unix people and Free/Open Source Software people. This is a good and wonderful thing, but it means dealing with anything Microsoft is bad. There are worse things than Microsoft -- I'd work with VB anytime before I touch Tcl again -- so I'll put aside those feelings and get directly to a practical place. Which is, ASP follows a PHP-like stance of putting the code within markup (lead the way, actually, but you get my point), while CGI puts the markup within code. So, if we were to build a 10x10 multiplication table, it'd be something like this in CGI/Perl:
print qq(<table>) ; for my $a ( 1 .. 10 ) { print qq(<table><tr>) ; for my $b ( 1 .. 10 ) { my $c = $a * $b ; print qq(<td> $c </td>) ; } print qq(</tr>) ; } print qq(</table>) ;
While something about the same in ASP would look more like this, although it's more PHP-ish and pseudocode:
<table> <? for my $a ( 1 .. 10 ) { ?> <tr> <? for my $b ( 1 .. 10 ) { ?> <td><? ($a * $b) ?></td> <? } ?> </tr> <? } ?> </table>
You can do interesting things in the Visual-Basic-like Microsoft languages. I have. Writing them isn't nearly as pleasurable as writing them in Perl, which is why I'm not a VB-monk, assuming any such thing exists. But if you want the code-within-markup experience, and you have a Unix/Linux server around, PHP would good (and cheaper than MS licenses) solution. And there might be Perl things that do it, too, but I don't know of anything.

.sig goes here


In reply to Re: CGI vs ASP by titivillus
in thread CGI vs ASP by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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, details, 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, summary, 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.