in reply to Quick and Dirty Everyday Email Subroutine

I see what you mean

You are right, but when I use this code i have a varible $mail_prog at the top of the script.

True if you take it as input from a form it can be quite dangerous.

Like:

#!/usr/bin/perl ....... $mail_prog = "/usr/bin/sendmail"; ....... Call Email Subroutine here. ........