I see that other PerlMonks have already suggested improvements to your code and such. So on a different note, I thought I'd suggest that you might want to investigate linking your files instead of copying them.
This would save you the overhead and disk space of copying files with similar results. Obviously, if you're copying the file to make a backup before changing the contents of the source file, linking isn't what you want.
--roboticus
In reply to Perhaps linking might be useful?
by roboticus
in thread Copying files between directories. How can I improve this code.
by richill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |