in reply to Partition monitor, aka, I told you it was ugly
I recommend Mail::Send for handling mail.
Or in a cron, if the cron is propery configured, any cron which prints will generate email to an appropriate list.
Also note that it is generally good to avoid hardcoding user names in code like this. If you can make it a group name, that would be good...
And finally, for running a process that you need to send data to, rather than writing a file and then using system, open on a pipe and write to that pipe.
|
|---|