"You never really know how a wheel works, until you tear it apart. I bet you now know more than most about the http protocol, now that you built your own. I think building your own webserver is a great educational exercise, because it exposes you to all the problems involved, and also makes you appreciate the pre-made wheels that are given to us."
reading large file where foreach my $line (<$readHandle>) { is list context and while (defined( my $line= <$readHandle>)) { is scalar context by Corion
Note that $, % and @ don't tell you what type variables are, they tell you what type of thing an expression returns. So $ref returns a scalar which may be a reference to an array or a hash. @$ref and @{$ref} return arrays (they are equivalent) by dereferencing $ref. The {} version is much clearer (and often required) when the expression used to get the reference is complicated.
Snippets of code should be wrapped in
<code> tags not<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).