Mega Code Archive

 
Categories / Perl / File
 

Copying a file using the File

#!/usr/bin/perl -w use File::Copy; $input  = "text.txt"; $output = "text1.txt"; copy($input, $output) or die "Can't copy $input to $output due to $!.";