in reply to XML::Twig - provide additional parameters to twig_roots handlers

I guess you are looking for 4.6 A simple HTML+ converter example.You can pass your $para to your function like this.

XML::Twig->new( twig_roots => { 'div' => sub{ &div(@_,$para); }, } )->parsefile("my_file");
and use it in your function
sub div { my ($t, $elt,$para) = @_; ...
I hope I understand your intention...