, why not do the unzipping within your perl script? You could call the script with the argument of the filename. That way, within the script you can first determine the file size, then keep track of how much data you've processed so far, calculating your progress. . . There's no need to have gzip pipe the data to perl.