in reply to $sftp->binary failing

"Failing" is not an accurate enough description of the problem - are you getting error messages (if yes, which ones exactly?), is something else going wrong, etc.?. Please read and follow How do I post a question effectively?