use strict; use XML::Simple; use Data::Dumper; my $xml = < This is the start... This is the middle... EOT my $xs = XML::Simple->new; my $data = $xs->XMLin($xml); print "$data->{Here}{ID}\n"; print "$data->{There}{REF}\n"; print Dumper($data);