[Za-pm] Re: Za-pm digest, Vol 1 #15 - 1 msg

Dallas G fuzzylogik at webmail.co.za
Mon May 26 10:08:35 CDT 2003


Hi,

Its one of those subjects that could go on forever.

Well thats why i am here to learn perl from people who use it in production
systems
as i currently use php mostly.

Also i am working on a web engine that allows one to use any scripting lang
in perl, well i am trying to

Dallas

----- Original Message ----- 
From: "Oskar Pearson" <oskar at qualica.com>
To: "Dallas G" <fuzzylogik at webmail.co.za>
Cc: "Dr Giancarlo Contrafatto" <contrafa at biology.und.ac.za>;
<za-pm at mail.pm.org>
Sent: Monday, May 26, 2003 5:05 PM
Subject: Re: [Za-pm] Re: Za-pm digest, Vol 1 #15 - 1 msg


Hi Dallas

> >1) libraries I write in perl can be used from the command line easily:
> >I can write a library and use it in a cron job and in a web page.
> so can php, i run several cron jobs every hour, all php, with no
performance
> loss

Cool - I remember seeing some way of running programs with a command-line
version (this was years back, when I last used it), but it seemed more
suited
for debugging than for cron-type-stuff.

> >2) php programmers generally have a poor idea of the seperation between
> >code and interface. They put db queries straight into their table
> >layout code and other such things.
> i have seen many programmers do this, even perl programmers

Oh absolutely - I agree with that. The difference is, however, that
almost all the reference material I've seen and read for php seems
to have examples like this:

 print "<table>\n";
    while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
        print "\t<tr>\n";
        foreach ($line as $col_value) {
            print "\t\t<td>$col_value</td>\n";
        }
        print "\t</tr>\n";
    }

(that's from the php manual at http://www.php.net/manual/en/ref.mysql.php)

I think that this leads to a whole bunch of people that program in
the same way, which leads to code that (in general) looks uglier.

Of course, perl easily ends up looking like line noise too, but in
general it's not line-noise-mixed-with-html-code, imho.

These are vast generalisations - perhaps I just like perl too much :)

Oskar
--
Oskar Pearson <oskar at qualica.com>
Qualica Technologies (Pty) Ltd
web: http://www.qualica.com/




More information about the Za-pm mailing list