# open intermediate file for pass of XML file open (INTFILEout, '>', $intfile) or die ("Cannot open file $intfile") unless -f $intfile; # parse thru XML file into intermediate file my $parser = new XML::Parser; $parser->setHandlers( Start => \&startElement, End => \&endElement, Char => \&characterData, Default => \&default); $parser->parsefile($xmlfile); # close intermediate file from first pass of XML file close INTFILEout; ### is anything in INFILEout at this point? If so, how ### would the parser know how to put it there? ### stop the code here and cat or type the contents of INFILEout