G
Geek
How can I get the following code to display a meaningful error message if
the "open" command doesn't succeeed?
$blatString = "\|C:\WINNT\SYSTEM32\blat.exe
\"d:\temp\message_body.txt\" -t \"(e-mail address removed)\" -s \"This is a
test\" -f \"(e-mail address removed)\" -i \"Web Server\" -server mail.nowhere.com
open (MAIL2, $blatString));
I'd like something that displays the actual error encountered, not just
something like this:
$blatString = "\|C:\WINNT\SYSTEM32\blat.exe
\"d:\temp\message_body.txt\" -t \"(e-mail address removed)\" -s \"This is a
test\" -f \"(e-mail address removed)\" -i \"Web Server\" -server mail.nowhere.com
unless (open (MAIL2, $blatString)) {
print "<p>Can't execute Blat</p>";
$BlatError = 1;
}
the "open" command doesn't succeeed?
$blatString = "\|C:\WINNT\SYSTEM32\blat.exe
\"d:\temp\message_body.txt\" -t \"(e-mail address removed)\" -s \"This is a
test\" -f \"(e-mail address removed)\" -i \"Web Server\" -server mail.nowhere.com
d:\temp\~blatoutput.txt";
open (MAIL2, $blatString));
I'd like something that displays the actual error encountered, not just
something like this:
$blatString = "\|C:\WINNT\SYSTEM32\blat.exe
\"d:\temp\message_body.txt\" -t \"(e-mail address removed)\" -s \"This is a
test\" -f \"(e-mail address removed)\" -i \"Web Server\" -server mail.nowhere.com
d:\temp\~blatoutput.txt";
unless (open (MAIL2, $blatString)) {
print "<p>Can't execute Blat</p>";
$BlatError = 1;
}