my $mailfrom = 'someone@somewhere.com'; my $mailcommand = "/usr/lib/sendmail -f\"$mailfrom\" -O\"NoRecipientAction=add-to\" -t "; my $to = '...' # recipient goes here open MAIL, "| $mailcommand $to" or die "$0: Cannot execute command: $!\n"; print MAIL <