Thanks for the reply but after modify, I still couldn't open the attached pdf file. I am running this under fedora 6. Any other suggestion? BTW, If you entirely stay away from IO::All, what method would you call when you want to attach a file to email?