- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] Perl splitting help
- From: Jamie Honan <jhonan@xxxxxxxxxxxxxxxx>
- Date: Sun Jul 23 17:40:16 2000
- Cc: Rodos <rodos@xxxxxxxxxxx>
Rodos proposes simplifying (something like) :
> ($name, $number) = split /\|/;
> print " <tr>\n";
> print " <td>$name</td>\n";
> print " <td>$number</td>\n";
to (something like) :
> print "<table>\n";
> while (<>) {
> chomp;
> s/\|/<\/td><td>/g;
> print "<tr><td>$_</td></tr>\n";
> }
> print "</table>\n";
and writes :
> In Perl there is always more than one way to do it. Language of the
> Gods.
Am I alone in believing that is _precisely_ what is wrong with perl?
That a useful, generic programming pattern has been replaced with
something obscure and difficult to discern.
And hence, leads to the charge "write only language".
Perhaps "whom the gods wish to destroy, they first make crazy".
Friday night, pistols or swords?
Jamie