# shlomi-fish-homepage / bin / extract-screenplay-xml-html.pl

 Shlomi Fish 44c7eaf 2012-06-14 shl...@cec68495-… d59b400 2007-05-20   1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 #!/usr/bin/perl use strict; use warnings; use Getopt::Long; use IO::All; my $out_fn; GetOptions( "output|o=s" => \$out_fn, ); # Input the filename my $filename = shift(@ARGV) or die "Give me a filename as a command argument: myscript FILENAME"; my$text = scalar(io()->file($filename)->slurp());$text =~ s{<(/?h)(\d+)}{"<".$1.($2+1)}ge; $text =~ s{\A.*?( ")) = " "; io()->file($out_fn)->print(\$text);