in reply to Re: Replace html nodes (HTML::Element treebuilder xpath)
in thread Replace html nodes

Thank you.
$node->replace_with( $some_other_node->detach )->delete
is working fine