POSM1M029 CNAM1D001 G:\Interfaces\ApplnData\DENVER_TRAN\NaviSys\Input\EXPORT_CFM.txt L:\Enterprise Reports\Input Files\ipCNAM1D001Confirm.txt G:\Interfaces\ApplnData\DENVER_TRAN\Navisys\Input\EXPORT_ERR.txt L:\Enterprise Reports\Input Files\ipCNAM1D001Error.txt #### use Win32::OLE qw(in with); #my $xml_file = 'file.xml'; my $DOM_document = Win32::OLE->new('MSXML2.DOMDocument') or die "new() failed"; $DOM_document->{async} = "False"; $DOM_document->{validateOnParse} = "True"; my $boolean_Load = $DOM_document->Load("file.xml"); if (!$boolean_Load) { die "topten.xml did not load"; } my $Reports = $DOM_document->DocumentElement(); my $Report = $Reports->childNodes(); foreach my $Event (in $Report) # make sure you include the 'in' { my $temp =$Event->Attributes->getNamedItem("report-name")->{text}; print $temp; }