I would personally rather not import anything in my namespace, but use the OO interface instead. This is a matter of taste, but anyway this would be "my coding style":
my $cgi = new CGI;
my $_name = $cgi->param('name') || '';
I know, this isn't going to work with HTML::Entities
, but I made the lucky choice to use UTF-8 as encoding for our webpages, so no character escaping necessary (unless your input charset isn't UTF-8, but that's another story about Text::Iconv
Otherways, I like the POSIX character classes (even more when we're talking UTF-8 and international users). I still use those old fashioned ranges like [a-zA-Z] however, 'cause we are still on 5.00_03 on our production servers blush ;-)
Do I need a Disclaimer?
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:
Outside of code tags, you may need to use entities for some characters:
- 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
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||