Can some body help me why I am getting "out of memory error". Below is the code I am trying to execute. Mu input xml file is 300KB size.
Code:
use XML::Simple;
#assigne variables
my @engines = (1,2,3,4,5);
open(OUTPUT, "> "output_file.txt") or die "Can't open output_file.txt") for write: $!";
# create object
$xml = new XML::Simple;
# read XML file
my $data = $xml->XMLin("input.xml",KeyAttr => "number");
foreach $n (@engines)
{
print OUTPUT "***************\n";
print OUTPUT "Engine $n \n";
print OUTPUT "***************\n";
print OUTPUT $data->{Job}->{Step}->{5000}->{Action}->{Engine}->{$n}->{Error};
}
# print the final totals listing
print OUTPUT "****************\n";
print OUTPUT "Final Totals \n";
print OUTPUT "****************\n";
print OUTPUT $data->{Job}->{Step}->{5000}->{Action}->{Engine}->{Log};
print OUTPUT $data->{Job}->{Step}->{7000}->{Action}->{Engine}->{Log};
print OUTPUT $data->{Job}->{Step}->{9000}->{Action}->{Engine}->{Log};
close OUTPUT;
Comment