We have several perl scripts, which generates and emails reports. The script that emails the files expects a .zip extension. The report scripts generates a .txt or .xls file and then runs the following zip command:print `zip -m $zip_filename $output_filename`;What's happening is that in some cases (typically, when the perl script uses a lot of memory), the above command fails. From what I gathered the script fails, because there is not enough memory to run the zip command. This is a sporadic problem, and a bit hard to pin-down.I have to generate .zip files and cannot use a different compression method. I was hoping that someone could tell me whats going on here. I am suspecting that the -m flag might be causing this. What's weird to me is that I have manually ran the zip command from bash several times, and never had it fail, even while using a lot of memory.Here's the result of a free command to give you an idea of how much memory I am talking about. The report scripts can occasionally use more than 10GB of Memory:-bash-4.1$ free             total       used       free     shared    buffers     cachedMem:      49409336   48948192     461144          0    1184716    8147564-/+ buffers/cache:   39615912    9793424Swap:      2047992    2047988          4$output_filename could be a pattern matching more than one file.
zip command is failing during high memory usage
rhel;perl;zip