in reply to Re: Re: Using system with mailx
in thread Using system with mailx

I just read "perldoc -f close" which leads me to an even better example showing a non-zero exit status. If mailx is having problems, not checking the result of the close() call could easily hide those problems.
    close PIPE
        or die $! || "exit status $?";