4 local $/; # Slurp the whole file
5 my $contents = <STDIN>;
7 $contents =~ m@^<h3 id="NAME">NAME</h3>@m;
8 $contents = $'; # Everything before and including NAME is removed
10 $contents = $`; # Everything including and efter the next h3 is removed
11 $contents =~ s@</?p>@@g; # All paragraph tags are removed
12 $contents =~ s@^\s+@@s; # All whitespace at the beginning is removed
13 $contents =~ s@\s+$@@s; # All whitespace at the end is removed
14 $contents =~ s@\s+@ @gs; # All whitespace blocks are collapsed to a space