http://www.perlmonks.org?node_id=315624


in reply to Help on emailing results

If you're running your script from a Unix box and you have Sendmail installed, you can always add this to your print:
my $mailprogram = '/usr/sbin/sendmail'; # or path to your sendmail open (MAIL,"|$mailprogram -t"); print MAIL "To: toaddress\@example.com\n"; print MAIL "From:fromaddress\@example.com\n\n"; print MAIL $yourdata; #### Existing code that prints to the screen ### print "$yourdata\n"; #### End of print to screen ### close(MAIL);
Hopefully this helps. I can't say it will or will not work for sure with your program since I haven't seen it.

-phill
Updated with missing \n that ysth spoted for 10 points.