#!/usr/bin/perl -w use strict; use Archive::Tar; my $tar = Archive::Tar->new; $tar->read('file.tar.gz'); $tar->extract();