This is very strange behaviour.. I've tried the same on my Win 2000 machine and I am facing the exact same results. However, on my Linux install I have no issues.
I decided to take a look at CGI.pm on my W2k machine. It appears as though it has some problems with either CGI::Defaultclass or with setting binmode for main::STDIN. I uncommented 3 lines in the module (do a search for "if ($needs_binmode)") and the script works fine.