in reply to Running script at server

It's impossible to tell from your description of the problem, but make sure when you open the file for writing, you do something like this:
open (FILE, '>'.$file) || die "Couldn't open $file for writing ($!)";
This will let you know if there are any problems with permissions, paths, etc.