On Fri, 2021-10-01 at 17:01 -0500, Andy Bach wrote:
> > If the signal would be caught, I could handle the error and try to
> reconnect, or, if that also fails, do something else.
>
> Oh. I was thinking you wanted it to check the connection before trying to
> print. Well, the print stmt returning u
> If the signal would be caught, I could handle the error and try to
reconnect, or, if that also fails, do something else.
Oh. I was thinking you wanted it to check the connection before trying to
print. Well, the print stmt returning undef will tell you the same thing.
Hmm, it would appear print
On Thursday, September 30, 2021 9:30:01 PM CEST Andy Bach wrote:
> > https://perldoc.perl.org/functions/print says that 'print' would return
>
> true
>
> > if successful and doesn't say what it returns otherwise. It also says
>
> that
>
> > "Printing to a closed pipe or socket will generate a
> https://perldoc.perl.org/functions/print says that 'print' would return
true
> if successful and doesn't say what it returns otherwise. It also says
that
> "Printing to a closed pipe or socket will generate a SIGPIPE signal."
Looks like print returns 1 if it succeeds, undef if not:
$ perl -wE '