You can use
IO::Scalar and pass Net::FTP the filehandle, or use IO::File's new_tmpfile() to create a file handle and pass it to Net::FTP.
Update: I looked at the link in AnonyMonk's reply, then I looked
at the code. With a little patching, there doesn't seem to
be any real need to use
fileno, unless
Mr. Barr knows
of a good reason not to go this route (I don't have anything
to test on at the moment, so it'll have to wait if
I try to do it) :-)
Update: I think
princepawn has a better idea anyway :)