#!/usr/bin/perl -w use strict; # Convert my HTML transcriptions into plain ASCII # 2005-Mar-03 Brian Foley my $pre = 0; while(<>) { $pre = 0 if (m!!); # Only output text between
...tags if ($pre) { # Strip and tags s!?[au][^>]*>!!g; # Strip out span tags (used for boxes etc) s!?span[^>]*>!!g; # Strip < and > entities s!<!!g; # Strip & entity. This must be done # last, otherwise things like > will # be misconverted. s!&!&!g; print; } $pre = 1 if (m!
!); }