There are many ways to send email from a Perl script, one the all time popular being using sendmail. But, there are other ways of sending emails, one of which is using the module Net::SMTP.All you have to do is to include the Net::SMTP module in your script and try using the example below.
Read more about Net::SMTP here.
#Create a new object with 'new'.
$smtp = Net::SMTP->new("smtp.go4expert.com");
#Send the MAIL command to the server.
#Send the server the 'Mail To' address.
#Start the message.
#Send the message.
#End the message.
#Close the connection to your server.