July 26th, 1999, 11:43 AM
Can anyone tell me how I can move files
between directories with Perl?
July 27th, 1999, 03:11 PM
This may help, it is taken from the "Camel Book":
rename OLDNAME, NEWNAME
This function changes the name of a file. It returns 1 for success, 0 otherwise (and puts the erroro code into $!). It will not work across filesystem boundaries. If there is already a file name NEWNAME, it will be destroyed.
Thus you could use something as follows:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
rename $oldfile, $newfile;
[This message has been edited by moderator (edited 07-27-99).]