(where ... == the rest of the line) open (SENDMAIL ...) ==> $smtp=new Net::SMTP("localhost"); print SENDMAIL "HELO ..." ==> (implicit) print SENDMAIL "MAIL ..." ==> $smtp->mail(...); print SENDMAIL "RCPT ..." ==> $smtp->to(...); print SENDMAIL "DATA" ==> $smtp->data(); print SENDMAIL "..." ==> $smtp->datasend(stuff); print SENDMAIL "." ==> $smtp->dataend(); print SENDMAIL "QUIT" ==> $smtp->quit();