#!/usr/local/bin/perl -w my $tarPath = "/path/to/place/tar/file"; my $fileName = "/path/to/file"; my $command = "tar xvf "; $message = system ($command $tarPath $fileName); if ($message == 0) { print "All done!\n"; } else { print "Whoops! $command gave exit error: $?\n"; }