Reading several XML files into an array and parsing them with Perl

rondolphin

New Member
I would like to read multiple XML files in an array and then parse them one by one.Here is what I am doing:\[code\]my $output = "c:\documents\outputfiles";opendir (FILE, $output) or die "can't open the $output";my @files = readdir File;print @files; \[/code\]This will list all the files under "outputfiles" directory. How do I just read the XML files?I also tried: \[code\]my @files = grep {*.xml} readdir FILE;\[/code\]This does not work.
 
Back
Top