1. If you are looking to print in a web-based situation, it is best that you use
print <<EOM; If you know this, then disregard the rest, but it allows you to print out until the intepreter finds that specific string. Very convenient, especially if you are printing at the end of your script. Passing variables is always preferable to using globals, just from the aspect of good programming practice.
2. I think that using built in reserved oeprators are faster than calling shift, but calling shift explicitly gives you the variable, where $_ may occasionally get you mixed up, and that's alot harder to find, especially when Apache is barking at you ;)
3. If you are concerned about speed, then you should consider compiling Apache with mod_perl, but CGI.pm is a great interface, and makes life alot easier. You don't need to concern yourself with the HTTP header information, but if you want to make the most of the module, you can consider using it to output your resulting HTML using that module. So you don't need to learn that terrible markup language ;)
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.