如何使用 Perl 的 Net::FTP 直接读取文件内容? [英] How can I read a file's contents directly with Perl's Net::FTP?

查看:50
本文介绍了如何使用 Perl 的 Net::FTP 直接读取文件内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将文件从一台主机传送到另一台主机.我们可以使用 NET::FTP 模块获取文件.在该模块中,我们可以使用 get 方法来获取文件.但我想要文件内容而不是文件.我知道使用 read 方法我们可以读取文件内容.但是如何调用 read 函数以及如何获取文件内容?

I want to get the file from one host to another host. We can get the file using the NET::FTP module. In that module we can use the get method to get the file. But I want the file contents instead of the file. I know that using the read method we can read the file contents. But how do I call the read function and how do I get the file contents?

推荐答案

USE File::Remote 用于透明地读/写/编辑远程文件

USE File::Remote for Read/write/edit remote files transparently

这篇关于如何使用 Perl 的 Net::FTP 直接读取文件内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆