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.
In reply to Re: foreach loop to untar multiple files
by hippo
in thread foreach loop to untar multiple files
by fasoli
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |