12345678910111213141516
my $fn = '/usr/.....';open($R,"<:utf8",$fn);$tree->parse_file($R);@text_nodes = $tree->look_down("_tag","p", "class","spip", "align","justify");my $txt = "";foreach my $node (@text_nodes){ $txt .= $node->as_text(); $txt .= "\n";}open(W,">:utf8","out.txt");print W $txt;close W;