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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Simple Perl programme using
by ambrus (Abbot) on May 23, 2007 at 08:26 UTC | |
by Tux (Canon) on May 23, 2007 at 09:57 UTC | |
by merlyn (Sage) on May 23, 2007 at 14:33 UTC | |
|