#!/usr/bin/perl =head1 NAME abc2html - encode ABC music notation as HTML =head1 SYNOPSIS abc2html [file].. =head1 DESCRIPTION This reads the input files (or stdin), and writes (to stdout) the ABC text with < and > characters encoded as HTML entities. We also surround the text with
> and, complete with the required blank line to prevent ABC programs from trying to interpret the tag and whatever follows. While we're at it, we also canonicalize the ends of lines by trimming away all white stuff and replacing it with a single newline. =head1 OPTIONS =head1 EXAMPLES =head1 FILES =head1 BUGS =head1 SEE ALSO =head1 AUTHOR John Chambers
\n"; for $l (<>) { $l =~ s"\s+$"\n"; $l =~ s"<"\<"g; $l =~ s">"\>"g; print $l; } print "\n\n";