in reply to Re^4: Net::SCP::Expect Error Handling
in thread Net::SCP::Expect Error Handling

It creates the scp-capture file but does not write anything to it.

Yes, the scp command doesn't output anything by default unless some error happens. You can set the verbose option in order to change that.