This is, AIUI, precisely the functionality provided by File::Copy::NoClobber. Unless this is a learning exercise I don't see any advantage to reinventing that particular wheel. HTH.
In reply to Re: File::Copy renaming trouble
by hippo
in thread File::Copy renaming trouble
by NoobCoder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |