An error has occurred in the program
close mailprog: $?=-1,$!=Broken pipe at form-mail.pl line 507.
This is the section in the code:
}
print MAIL "$dashes\n\n";
foreach (@{$Config{env_report}}) {
print MAIL "$_: ", strip_nonprintable($ENV{$_}), "\n" if $ENV{$_};
}
close (MAIL) ¦¦ die "close mailprog: \$?=$?,\$!=$!";
}
sub open_sendmail_pipe {
my ($fh, $mailprog) = @_;
my $result;
eval { local $SIG{__DIE__};
$result = open $fh, "¦ $mailprog"
};
How do I fix that?
And what is the return value of that sub? Is it being tested? The message looks like it could indicate that an attempt was made to close a non-open handle. I'd have to see more code.
[added]
I know you can omit the semi-colon in the last if block. Not sure if you can get away with it on that last statement. In fact, the semi-colon after the bracket looks misplaced.
/J\