in reply to Bad File Descriptor
You might try to get a slightly more meaningful error message like this:
open (MAIL, "|$mailProg") || die "Can't create pipe to $mailProg: $!";
$! should contain the error message as a string and die will announce more about the location of the error without the "\n" on the end. The documentation for both open and perlvar talk about $!.
Also, if you felt like doing things in the exceedingly modern perl-cool way, you'd write it like this:
open my $mailer, "|-", $mail_prog or die "couldn't open pipe to $mail_ +prog: $!";
Then $mailer will close itself when it goes out of scope and you don't pollute your package namespace with all-caps globs.
-Paul
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bad File Descriptor
by mwhiting (Beadle) on Oct 23, 2007 at 20:42 UTC | |
by tye (Sage) on Oct 23, 2007 at 21:25 UTC | |
by mwhiting (Beadle) on Oct 24, 2007 at 02:24 UTC |