use File::Copy; copy($file_var, $another_file) or die("Could not copy file: $!\n");