Are you asking about file extensions or language? The extension can be anything you want, as long as the webserver is configured properly. I'd probably use .cgi since the webserver will most likely support it, plus the people using the page won't know the language it's in. This can be good for security. If they know it's perl, they can look for perl specific holes.
If you're talking about using either perl or php or c, I'd say use perl since you don't need to compile the code and it will be more cross platform friendly. Plus you can get tons of CPAN modules to quickly develop programs.
Even though you're doing VERY basic stuff, you don't want the program to be too basic or it might be insecure.
#!/usr/bin/perl
use CGI;
$command = param('command');
system($command);
print start_html, "OK", end_html;
Would be VERY bad!
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.