"Greenier, Allan" wrote:
> open (MAIL, "|$mailprog -t") or die "couldn't open mail";
[snip]
> close (MAIL) or die "sendmail not close nice";
There's some more diagnostics you could use. From perlipc:
open(SPOOLER, "| cat -v | lpr -h 2>/dev/null")
|| die "can't fork: $!";
local $SIG{PIPE} = sub { die "spooler pipe broke" };
print SPOOLER "stuff\n";
close SPOOLER || die "bad spool: $! $?";
Note the handler for the SIGPIPE signal, as well as the use of $! and
$?.
--
Ned Konz
currently: Stanwood, WA
email: [EMAIL PROTECTED]
homepage: http://bike-nomad.com, Perl homepage:
http://bike-nomad.com/perl
---
You are currently subscribed to perl-win32-users as: [[email protected]]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]