in reply to move the file to other folder
You can usually just use rename(), though this is somewhat implementation-dependent. If you're under Unix and not moving the file across filesystems, this is simplest, as it just changes the directory entries. I believe File::Copy's move() function attempts this first, and if it fails, tries to copy the file and unlink the source, so that's probably your best bet.