$ret_value=system("copy \"$source\" \"$target\""); if($ret_value ne 0) { open(FAIL,">>failed_copy_$channel"); print FAIL"FAILED TO Copy \"$target\" WITH FROM \"$target_input_file\" +....\n"; close(FAIL); }