bezi1r has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: IO::Async how using with a named pipe?
by Your Mother (Archbishop) on Apr 06, 2019 at 19:38 UTC

    I had a spinach salad with cottage cheese and home grown tomatoes for lunch, and it was great. Thanks.

      "...spinach salad with cottage cheese..."

      Did you really eat this? I guess this dish looks like children shit and abandon all hope. But probably it looks a bit better with the homegrown tomatoes. Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

        Looked quite like like this but nicer with paprika and such. I understand it was not Wyke Farms Cheddar or White Stilton Gold but it certainly was presentable! Harrumph!

      I hate cheese!

        File a help request. Please include specifics about the cheese, the time of ingestion, any physical reactions, and exactly what else you ate or were doing at the time.

        Cheese
        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re: IO::Async how using with a named pipe?
by Anonymous Monk on Apr 07, 2019 at 02:54 UTC

    Hello bezi1r,

    Typically, the monks are generally nice. But, give them something more like what have you tried or where does the code fail. You will likely receive better help.

    Try replacing the following bits in the code.

    while ($$buffref =~ s/^(.*)\n//) { print "$1"; }

    With this.

    while ($$buffref =~ s/([^\n]+)\n//) { print "$1\n"; $$buffref =~ s/^\n//; }

    This works too, another way.

    while ( (my $pos = index($$buffref, "\n")) >= 0 ) { print substr($$buffref, 0, $pos + 1); substr($$buffref, 0, $pos + 1, ''); }

    Good luck.