Copy files
#!/usr/bin/perl use warnings; use strict; use File::Copy; print "Filename: "; my $infile = <>; chomp $infile; print "New name: "; my $outfile = <>; chomp $outfile; unless (copy $infile, $outfile) { print "Failed to copy '$infile' to '$outfile': $! \n"; }