sub sendmailto { # Get the text of the attachment: my $attachment = `uuencode /path/to/document.doc`; # Create the mail body: my $message = <