This code seems to work well for my purposes. The syntax is
easier than I expected. Regular expressions are a bit cryptic
to me, but I am quickly learning, thanks to you and many
other people from Perlmonks who have given me advice. Thanks
for the help.