codewalker has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I Just want process all xml files within multiple subfolders
But my current code is used to grep the files within the folder
use strict; undef $/; my $path = $ARGV[0]; my $out = $ARGV[1]; opendir(DIR, $path) || die "cannot read folder path"; my @xmlfiles = grep {/\.xml$/i} readdir(DIR); closedir(DIR); foreach my $xml(@xmlfiles) { open(FIN, "$path/$xml") or die("Couldn't open input File!!"); my $file = <FIN>;
Can anyone knows how to process within multiple folders in perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: To process xml files within multiple subfolders in perl
by dasgar (Priest) on Nov 25, 2015 at 08:16 UTC | |
|
Re: To process xml files within multiple subfolders in perl
by Corion (Patriarch) on Nov 25, 2015 at 08:12 UTC |