|
|
How to move a file using Perl? - Perl
|
Views : 316
|
|
Tagged in : Perl
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
You can move a file with Perl with the File::Copy module (yes, it also handles "move").
Example:
use File::Copy;
$original_file = 'original-filename.txt';
$new_file = 'new-filename.txt';
# the perl file move function
move($original_file, $new_file) or die "The move operation failed: $!";
|
|
By Nithya, On - 2010-02-04 |
|
|
|