#!/usr/local/bin/perl5 -w use XML::Twig; my $twig = new XML::Twig( TwigRoots => { "LINK" => 1 } ); $twig->parse( "This < is a > "test' & don't you forget it" ); my $root = $twig->root; my @links = $root->children; print $links[0]->first_child_text( "TITLE" ), "\n"; Results: This < is a > "test' & don't you forget it