Thanks for all your help people :)
I eventually found the problem - totally unrelated to SSH file properties. It turns out that in processing the retrieved data from the stream that in some instances I had to undef $/. Unfortunately I forgot to redefine it afterwards. This explains why it was working for the first file processed and failing for each one after.
Again, thanks for your help :)