in reply to Re: (jeffa) Re: Parsing a Text File
in thread Parsing a Text File
open(INPUT,"c:/MLB_boxscore.TXT") or die "Can't open file"; print "<html><head><title>My page</title></head><body>"; print "<table>"; $pitching = 0; while(<INPUT>) { if($pitching) { last if /^[A-Z]+$/; chomp; @LS = (); push @LS, split('\|',$_); print "<tr>"; print "<td>" . $LS[$_] . "</td>" for (1..$#LS); print "</tr>"; } elsif(/^PITCHING/) { $pitching = 1} } print "</table></body></html>"; close INPUT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: (jeffa) Re: Parsing a Text File
by suaveant (Parson) on Apr 11, 2001 at 23:52 UTC |