in reply to Email With Attachment

you are calling the linux's "mail" command from perl. In that scenario, I would prefer to use MIME::Lite. If it is not from perl, I prefer to use shell scripting.