in reply to writting new files in perl

It's not Perl. It's the OS. You haven't told us enough info to know why it's not creating. Did you use or die "...: $!"? if so, what's the error text?

-- Randal L. Schwartz, Perl hacker