# use packagename; # For example: # use File::Copy; #!/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 $!.";