in reply to How do I extract text from an HTML page?
open (FILE, "+<$path/finalgrades.html") or die "Can't open file: $!"; +# where $path is the full path to the directory where the file reside +s. while (<FILE>) { if (m/^<b>[^<>]</b>, grade: (\d+)<br>$/) { my $name = $1; my $grade = $2; open (HTML, "+>>$path/$name.html") or die "$!"; print HTML "<html><head><title>CONGRATULATIONS TO THE PARTICIPANT +$name</title></head><body><h1>$name</h1> has just reviece "$grade" as + a grade for this seminar. Congratulations!!!<br></body></html> } } close (FILE) or die "$!";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How do I extract text from an HTML page?
by ido50 (Scribe) on Aug 03, 2003 at 17:57 UTC | |
by ido50 (Scribe) on Aug 03, 2003 at 18:00 UTC | |
by jeffa (Bishop) on Aug 03, 2003 at 19:02 UTC |