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


in reply to system "gzip $full_name" is taking more time

Something else occurred to me, after making my last response. That I think will help you greatly in more ways than one.

Consider "batching" the jobs/tasks. For example, concat a list of the files that will be processed; for tests for timing, and, more importantly, within your current script. You should end up with a much more efficient process, overall. This way, you can batch the tar command -- concat the file names, and dump the list on tar. The same goes for the rest. Slurping up a list should be pretty easy, and pretty quick. In short attempt to consolidate as much as possible.

Best wishes.

--Chris

Hey. I'm not completely useless. I can be used as a bad example.