in reply to Odd error message at 5.8.3

In unix, file descriptors (fd) identify opened files in system calls. Certain file descriptors have an assumed meaning:
0: Standard Input
1: Standard Output
2: Standard Error

Your program first closes STDIN, releasing fd 0.
Then it opens STDOUT. The system will use the first available fd, namely 0, to reference this open file.
Perl recognizes that fd 0 is write-only and issues the warning.

Messing with STDIN and STDOUT is usually done before calling exec. This warning is useful because the executed program expects fd 0 to be readable, but it's not.

You probably shoulnd't be messing with STDIN and STDOUT. Use other names for your file handles.