> On Wed, Nov 19, 2014 at 02:19:26PM +0000, PHILLIPS M.E. wrote:
> > open (MAIL, "|-", '/bin/mailx', '-s', $subject, @addresses)
> >         || die "Failed to e-mail report: $!\n";
> 
> what's the point of using perl then?

There's more than one way to do it.

If mailx is already installed and configured then this allows you to send your 
e-mail from your Perl script without installing other modules.  I have 
sometimes had to use servers where installing extra modules from CPAN was not 
under my control.

I was assuming that the original poster's script was doing various other things 
and needing to e-mail a report at the end.  Obviously if the script was only 
doing an e-mail then there would not be much point doing it this way....

Matthew

Reply via email to