http://www.perlmonks.org?node_id=2423

Elihu has asked for the wisdom of the Perl Monks concerning the following question:

I was trying to write a simple perl script the other day that, when given a tar or tar.gz file, got a listing of its contents (tar -tf or tar -tzf), put that into an array, then unlinked all those files. I often get tarballs that dump into the current directory, then have to manually delete all the files. I've written the script to take a file where I redirected the output of the tar listing, and removes files from the 2nd file, but I'd like to just dump all the files from the tarball into an array, and operate off of that.

Originally posted as a Categorized Question.