Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Sending Email to a list of people using Mail::Sender

by pvaldes (Chaplain)
on Aug 13, 2011 at 23:26 UTC ( [id://920189]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://920189]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-25 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found