http://www.perlmonks.org?node_id=1007834


in reply to problem HTML::FormatText::WithLinks::AndTables

Try this:
#!/usr/bin/perl use strict; use warnings; use LWP::Simple; use HTML::FormatText::WithLinks; my $html = get( "http://www.perlmonks.org/?node=Recently%20Active%20Threads" ); my $f = HTML::FormatText::WithLinks->new( base => "http://www.perlmonks.org/", unique_links => 1, link_num_generator => \&generator, before_link => '[%n]', footnote => '%n est %l' ); sub generator() { my $num = shift; $num += 1; return $num; } print $f->parse($html);