in reply to Reaped: Simple Perl programme using

I would say unhelpful, as it not even uses use strict, and your html quoting style uses ' instead of ", which is wrong.

#!/usr/bin/perl use strict; use warnings; print "content-type: text/html\n\n"; # SET UP AN HTML TABLE print qq{<table border="1">\n}; # COUNTER - COUNTS EACH ROW my $count = 1; foreach my $name (qw( Steve Bill Connor Bradley )) { print " <tr><td>", $count++, "</td>\n", " <td>$name</td>\n", " </tr>\n"; } print " </table>\n";

Is both more consice and more perlish


Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Simple Perl programme using
by ambrus (Abbot) on May 23, 2007 at 08:26 UTC
        And again, you can use either single or double quotes in XML (and therefore XHTML). That's the point. You're falsely claiming that double quotes are correct, and single quotes aren't. Wrong.
        A reply falls below the community's threshold of quality. You may see it by logging in.