1) check the return result of system command system("pscp ....") or { open $log, ">C:\pscp.log"; print $log "Can not execute the pscp command."; close $log; exit(1); } 2) add -v (verbose) option to your pscp command to print more info. redirect output of your pscp command to a log file. system("pscp .... -v >> c:\pscp.log 2>&1");