in reply to print() on closed filehandle..

Roger answered why your code produces these warnings. Now I'd like to share with you why it doesn't work without -w: you editted the scripts in Windows and didn't convert them when you moved them (ftp upload in binary?). Some possible solutions are:

  1. Remove all of the CR's. A simple way to do that is with:
    perl -i -pe's/\r$//' file.pl
  2. Provide a symbolic link called perl^M for your copy of perl.
  3. Just put a space behind perl in your sharp-bang line.

However, I think this is a good thing that you've turned on warnings as it has made you aware of some bugs that may otherwise have gone unnoticed for a while.

antirice    
The first rule of Perl club is - use Perl
The
ith rule of Perl club is - follow rule i - 1 for i > 1