http://www.perlmonks.org?node_id=986065


in reply to Re^5: XML::Twig traversing tree and storing in an array
in thread XML::Twig traversing tree and storing in an array

Thanks again, learned more. Regarding your first code post where Main( @ARGV ); is used for providing multiple xml files on command line, is the most practical way of placing output from each file into a separate hash by duplicating "for my $file" and specify $_[0], $_1, etc.
for my $file( $_[0] ){ # dd $filename = $file; ## eval { $twig->parsefile( $file ); 1; } or warn "ERROR parsefile($file): $@ "; }