in reply to Detect whether a writeable filehandle has closed?

Hey jdporter, could you please provide the open that you're specifically using that ends up failing?

I don't think I've ever used a pipe with open before, so before I try to test it out, an example would be great.

Replies are listed 'Best First'.
Re^2: Detect whether a writeable filehandle has closed?
by jdporter (Paladin) on Jan 13, 2021 at 18:01 UTC
    open my $pipe, " | $other_program ";

    For testing purposes, the other program could be cat. In my case, it's amqsputc, a sample program included in the IBM MQ product. I'm on linux (OpenSUSE 12).

      Doing some searching it looks like they might support AMQP; you possibly could use something like Net::AMQP::RabbitMQ to connect to the broker directly rather than piping things through an external program. Probably at least give you other different problems to deal with . . .

      The cake is a lie.
      The cake is a lie.
      The cake is a lie.