my $src_cmd = "C:/Windows/System32/OpenSSH/scp ". $src_file. " vinothg\@$server:".$target_path; print("Source copy cmd: $src_cmd\n"); my $output = qx($src_cmd); my $status = $? >> 8 ; if( $status ){ print("Error: $output\n"); return 0 }