use strict; use warnings; use File::Copy; my $source = "velocity.log"; my $target_input_file = "/tmp/not/there"; copy("$source" ,"$target_input_file") or do { open(FAIL,">>error.log"); print FAIL "FAILED TO Copy \"$source\" TO \"$target_input_file\" +....\n"; close(FAIL); }