my @request_headers = <$c>;
reads until the end of the file, pushing each line onto the array. However, you're suppose to stop reading when you see CRLFCRLF. To read just the next line, do:
my $next_line = <$c>;
You're reinventing the wheel, though. (And you're already doing things wrong, like reading too far, and not setting $/ to "\015\012".) There's already at least one mini perl httpd you can use, HTTP::Daemon, and I think it even comes standard with perl.
In reply to Re: IO::Socket Get Headers
by ikegami
in thread IO::Socket Get Headers
by JoeJaz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |