in reply to set permissions automatically

sysopen might be what you want:

use Fcntl qw( O_CREAT O_RDWR ); sysopen(FILE, "$file", O_RDWR|O_CREAT, 0755) ...

He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

Chady | http://chady.net/