unless (-e $ARGV[0]) { print "File does not exist. \n"; exit; } my($copy) = "$ARGV[0].bak"; copy($ARGV[0], $copy) or die "File cannot be copied. \n";