in reply to chmod changes on server when script runs

Look like what the script is rewriting the file with values saved in the .tmp file. When this is done, the server your running on will default permissions to 644. Might I suggest checking out chmod, or perldoc -f chmod for info on how to change the permissions after the file is re-written.

Also, try wrapping your code in <code> tags next time you post. ;-)

-- Can't never could do anything, so give me and inch, I'll make it a mile.