in reply to foreach loop to untar multiple files
chomp (@array = system "ls $results\/*.tar.gz");
The system function does not return its output - only its exit code. You probably want to use backticks instead. eg:
chomp (@array = `ls ${results}/*.tar.gz`);
Update: obviously a slow typing day for me :-) As my learned brethren have pointed out there are much better ways of doing this than shelling out at all.
|
|---|