As someone who uses both PHP and perl on a daily basis, I feel the need to point
out some bad assumptions here.
First, your reasons for avoiding PHP are based on some flawed assumptions.
Regarding (1) you can separate HTML from PHP just as you may with perl. While
Rasmus does claim PHP is a templating language, there are plenty of PHP
developers using template engines (look at the popularity of Smarty in the PHP
world if you have any doubts). (2) PHP5 introduced E_STRICT, which operates very
similarly to perl's 'use strict'. Additionally, you can set error reporting to
either be completely off, show all errors and warnings, or a number of grades in
between. Basically, you can get PHP to complain about exactly the same sorts of
things perl complains about when warnings and strict are used. (3) can also be
considered a benefit; there's little need to add external libraries as they're
already compiled into the language. And regarding (4), PHP has not been limited
to the web for quite some time; the CLI SAPI has been compiled into PHP by
default since version 4.3.0, and was available in the entire 4.x series. While
the CLI doesn't have the popularity of the web SAPIs, it is available, and many
PHP programmers utilize it (myself included).
Your reasons for choosing perl have everything to do with yourself and your
personal preferences, and little to do with the language. One can be either a
careful or slipshod programmer in perl -- as in any other language. CPAN and the
Monastery are probably the best reasons for choosing perl over another language
-- but PHP has PEAR, user comments to the online manual, and a variety of lively
mailing lists, making even those considerations somewhat moot. Basically, you
should choose the language that suits the problem at hand, and, if possible,
that others to whom you have direct access use (i.e., if your co-workers use a
language and are proficient in it, you should probably try to utilize that
language as you'll have mentors and people who can help debug and maintain your
code).
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|