in reply to Re: Telnet responses
in thread Telnet responses

If it's not a telnet server but a plain connection, you might be better off using something like ...

I completely agree, though personally I would implement it at a higher level than you showed: I'd use Mojo::IOLoop together with Mojo::IOLoop::Stream::Role::LineBuffer. Example code here.

Replies are listed 'Best First'.
Re^3: Telnet responses
by cavac (Prior) on Oct 20, 2023 at 12:29 UTC

    You are right, of course. If you can go higher level, you should.

    I usually go relatively low level on answers to SoPW and avoid using any frameworks that have their own control loops. This makes it easier for OP to integrate it into their own software that may have their own control loop already.

    (Besides, i love doing low level protocol stuff. It's a cavac thing.)

    PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP