in reply to Not getting form data from stdin

I would not recommend such a low level parsing of the data stream unless you have a very good reason to do so. CGI may not be the most complex of protocols but there's no need to reinvent the wheel yourself given CGI, CGI::Lite, Plack, Dancer2, Mojolicious, etc. Pick one of those and see how much easier it makes things.

To answer your question, however, you've initialised @in which is an array but then used it like $in{$key} which is a hash. I guess you have not used strict as that should catch this for you.