# 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 #### while ($linein = ){ chomp $linein; print FMTFILE "$linein\n"; } #### #!/usr/bin/perl -w use strict; my $x; my $y=1; sub setx {$x =1;} #### setx() or die "can't set X" unless $y; print "$x"; #Use of uninitialized value $x in string at C:\TEMP\testunless.pl line 8.