open (FILE, "+<$path/finalgrades.html") or die "Can't open file: $!"; # where $path is the full path to the directory where the file resides. while () { if (m/^[^<>], grade: (\d+)
$/) { my $name = $1; my $grade = $2; open (HTML, "+>>$path/$name.html") or die "$!"; print HTML "CONGRATULATIONS TO THE PARTICIPANT $name

$name

has just reviece "$grade" as a grade for this seminar. Congratulations!!!
} } close (FILE) or die "$!";