Perl Newby has asked for the wisdom of the Perl Monks concerning the following question:
open(DATA,"c:/MLB_boxscore.TXT") or die "Can't open file"; print "<html><head><title>My page</title></head><body>"; print "<table>"; $linescore = 0; if($linescore) { last if /^\s*$/; chomp; push @LS, split('\|',$_); print "<tr>"; } elsif(/^LINESCORE/) { $linescore = 1 } { print "<td>$linescore</td>"; print "</tr>"; } print "</table></body></html>"; close DATA;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing a Text File
by lachoy (Parson) on Apr 11, 2001 at 02:13 UTC | |
|
Re: Printing a Text File
by ton (Friar) on Apr 11, 2001 at 02:13 UTC | |
|
Re: Printing a Text File
by voyager (Friar) on Apr 11, 2001 at 02:24 UTC | |
by Trimbach (Curate) on Apr 11, 2001 at 05:00 UTC |