"David Heayn" wrote: > > I'm working with a script that needs to decompress log files before > it can read them as text. I hope to use a system() command and I > found this almost perfect snippet to place inside: Why do you need to decompress them beforehand? open(LOG, "gunzip $file |") or die "Cannot gunzip '$file': $!"; Or you can avoid the implicit system command by using Compress::Zlib. > find . -name '*.gz' -print | sed 's/^\(.*\)[.]gz$/gunzip < "&" > "\1"/' | s > from http://www.gnu.org/software/gzip/manual/html_chapter/gzip_3.html#SEC6 > > > This is great, however I really want to delete the all *.gz files > once I'm done with them. Any suggestions? Or would you go an entirely > different way? You can use File::Find to do what that does in Perl, cutting down the number of languages that you're using to a minimum. Once it is all in Perl it will be easier to add other actions as well (like deleting files). But still I would prefer using gunzip on the fly, particularly if the files are large. Cheers, Ben