use strictures; use XML::LibXML; my $dom = XML::LibXML ->load_xml({ IO => \*DATA }); my $last = [ $dom->findnodes("/library/book[last()]") ]->[0]; print $last->findvalue("title"), $/; __DATA__ Perl Best Practices Use python. But I keed! Perl Cookbook, Second Edition You would make more cooking meth. But I keed! Guitar for Dummies Stratocaster. Oh, I'm sorry, did I stutter?