To add to the above comments: you might wanna try using something like:
unless ($message && $subject) { ...
instead of:
if ( $message | $subject eq "" ) { ...
The '|' symbol is a bitwise operator, it might work the way you use it, but isn't a clean usage.
Also you could simply do one multiline print, instead of repeating the 'print MAIL' statement, then you wouldn't have had the bug in the first place.
--
Jaap Karssenberg || Pardus (Larus)? <pardus@cpan.org>
>>>>
Zoidberg: So many memories, so many strange fluids gushing out of patients' bodies.... <<<<