use strict; use warnings; use File::Copy; my $source="im"; my $target_input_file="/home/lakshmanan/Perl/"; my($channel,$target); eval{ copy("$source" ,"$target_input_file"); }; if($!) { open(FAIL,">>failed_copy_$channel"); print FAIL"FAILED TO Copy \"$target\" WITH FROM \"$target_input_file\" +....\n"; close(FAIL); }