Outdated perl utility txt2html migration

I noticed the other day we had an old utility script txt2html.pl that gave a warning
$* is no longer supported at /usr/local/bin/txt2html.pl line 1512.
Apparently $*=1 was how multi-line regex searching was done in old perls.

Now it is regex flag m and s like

$a =~ m /foo/ms;

I found the code had been updated and put in HTML::TextToHTML https://metacpan.org/release/RUBYKAT/txt2html-2.02 so I did

$ sudo cpanm HTML::TextToHTML

which gives us /usr/local/bin/txt2html, then mv'd the old txt2html.pl to txt2html.pl.orig and used ln -s to symlink txt2html.pl to point at /usr/local/bin/txt2html.

In my google search on the warning, I found this call for help:
so added a github Issue and emailed the author saying the updated and migrated txt2html.pl was already available on CPAN.

Leave a comment

About Peter Edwards

user-pic I blog about Perl.