As most of the above posts have indicated perl is much more powerful than php, although php is better suited to persons beginning programming on the web.
The question I would ask you is "Do you want to write a few simple CGI scripts and leave it at that, or are you intending to learn to program?";
- A few simple CGI scripts: Use PHP, it is a smaller, lighter language which is designed for CGI programming. You embed the code in the HTML and so it is quick to do simplo things such as just changing a single line on the page.
- More complicated coding: Go for perl (or python, java etc). Perl is very fully featured and extensible, and as such will take longer to learn. However you need not learn all of it to get good results. Perl will allow you to do things that PHP simply is no suitable for, such as templating, controlling other software, inerfacing to C libraries, GUIs etc.
PHP is a kick bike, perl is a motor bike. If you need to get to the corner now a kick bike is easy to learn and quite quick. If you want to go on the motorway, you'll need to put in the extra bit of effort to ride a motorbike. Just don't forget your helmet( use strict; use warnings and for CGI, perl -T).
--tidiness is the memory loss of environmental mnemonics
-
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.
|