#!/usr/bin/perl use warnings; use strict; use HTML::TreeBuilder::XPath; my $s = getHTMLString(); my $tree= HTML::TreeBuilder::XPath->new; $tree->parse($s); my @a = $tree->findnodes_as_strings ('//td'); for my $i (@a) { print "$i\n", } sub getHTMLString { return q( Testseite
  Aktivität    Doktor
  Land    Deutschland   ...
); }