#/bin/perl/ use strict; use warnings; # First, setting the directories we're interested in. my $inputs = "~/inputs"; # inputs we upload to the server. my $results = "~/results"; # results coming in. my @array; # tarballs of the incoming results. chomp (@array = system "ls $results\/*.tar.gz"); # putting all tar files in an array # tar can't accept multiple tar.gz files as input # arguments after the tarball filename are expected to be files to untar from the tarball. foreach (@array) { system "tar -tvf $results\/$_"; }