in reply to TCP server with IO::Socket

Whenever you get weird terminal output and carriage returns may be in the mix that's one of the first things to look for; piping things through od -xa or the like may be elucidating.

Also while you're doing this as a learning exercise be aware there's lots of well tested HTTP servers on CPAN and you'd probably be better served by one of them for anything beyond pedagogical experimenting. Things like Mojolicoious or Dancer2 give you a complete stack, whereas HTTP::Daemon is lower level; or look at POE::Filter::HTTPD for another approach.

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

Replies are listed 'Best First'.
Re^2: TCP server with IO::Socket
by AlexP (Pilgrim) on Jul 21, 2021 at 09:12 UTC

    od -xa looks very helpful. Thanks.

    Yes, mojo and dancer are my following goals!