in reply to Traversing SubDir and Execute Unix Command
Is this limited to *NIX? FWIW, you can merge your system calls into one:
Personally, I would add a check for system's return value and redirect gunzips output. For more robustness it might be better (slightly slower) to first scan for all *.gz files below @dirs and then decompress each file individually. That would allow to check the success of the decompression operation for each individual file - if that matters.for my $sd (@dirs) { system(qq{cd "$sd" && gunzip *.gz}); }
In Section
Seekers of Perl Wisdom