perl(8145) malloc: *** vm_allocate(size=8421376) failed (error code=3) perl(8145) malloc: *** error: can't allocate region perl(8145) malloc: *** set a breakpoint in szone_error to debug Out of memory! #### use XML::DOM; my @files = <$datapath/*.*>; foreach my $file (@files) { my $parser = XML::DOM::Parser->new(); my $doc = $parser->parsefile($file); ##I parse the documents }