#!/usr/bin/perl -w use strict; use XML::Simple; my $parser = new XML::Simple(ForceArray => 1); my $ref = $parser->XMLin('c:\temp\file.xml'); foreach my $host (keys(%$ref)){ foreach my $proc (keys(%{$ref->{$host}[0]->{process}})){ print "$proc is running on $host\n"; } }