in reply to perl/cgi question: script works from unix command line, but not web page

Just a few pointers that will help you find the problem. The following will help you find errors in your code.
#!/usr/local/bin/perl -w use strict;
When opening files it is a good thing to check to see if they actually opened or not.
open(FH, "<file.txt") or die "Could not open file.txt: $!\n";
The webserver will most likely be running under a different user then yourself and will have to have access to the files your are opening and modifing.

Hope this helps.

-bn