#!/usr/bin/perl use XML::Simple; use strict; # use strict, always use strict $x = new XML::Simple(); $xref = $x->XMLin('/path/to/xmlfile'); # $xref now stores your xml in a hashref