in reply to Sending Email to a list of people using Mail::Sender

Probably a better approach will be something like this...
open(TESTFILE,"<",$TestFile) or die "ERROR: Unable to open $TestFile f +or reading"; }
instead:
if (!open(TESTFILE,$TestFile)) { print "ERROR: Unable to open Test File for reading: $TestFile"; exit();
}

Replies are listed 'Best First'.
Re^2: Sending Email to a list of people using Mail::Sender
by GrandFather (Saint) on Aug 13, 2011 at 23:43 UTC

    Even better would be:

    open my $testFile, '<', $TestFile or die "ERROR: Unable to open '$Test +File' for reading: $!";

    Note the use of a lexical file handle and that the die reports the OS supplied error.

    True laziness is hard work