use HTML::FormatMarkdown; my $string = HTML::FormatMarkdown->format_file( 'test.html' ); open my $fh, ">", "test.md" or die "$!\n"; print $fh $string; close $fh;
HTML::FormatMarkdown is built on HTML::Formatter and documentation for that module applies to this - especially ``new'' in HTML::Formatter, ``format_file'' in HTML::Formatter and ``format_string'' in HTML::Formatter.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.