use strict; use warnings; use XML::Twig; my $t= XML::Twig->new( pretty_print => 'indented', twig_handlers => { # $_[1] is the element 'results_link' => sub{ $_[1]->print;} }); my $data =< https://myserver.com/app/search?q=%7Cloadjob%20scheduler_amJ1bGxvdWdoQGRldi1hbWVyaWNhZmlyc3QuY29t_at_1496880600_682%20%7C%20head%2020%20%7C%20tail%201&earliest=0&latest=now EOXML $t->parse( $data);