in reply to CHOMP VS. CHOP

I just recently had a hairy issue where someone, in their CGI script, had a
chop; chop; $_ = "$_\n";
which made file uploads from browsers in Windows DTRT, but totally broke my UNIX file-upload thingy. Part of the solution involved changing those three lines to read:
chomp; chomp; $_ = "$_\n";
You might try that here.