amadain has asked for the wisdom of the Perl Monks concerning the following question:

Monks
I was wondering if anybody familiar with the Expect.pm module for perl knew of a way of using this module to edit remote files? Is there any way of opening a remote filehandle through the expect object?

Thanks in advance
  • Comment on remote file handling through expect object

Replies are listed 'Best First'.
Re: remote file handling through expect object
by aquarium (Curate) on Oct 20, 2004 at 13:36 UTC
    you cannot expect (pun:) Expect.pm to open remote files. Expect.pm is for automating/scripting the interaction to locally started programs. You can edit files on file systems capable of remote mounting e.g. NFS...and then it's just a matter of opening the file as usual. However, you could handle a locally started telnet/ssh session with Expect.pm: login, and then start a remote program via the telnet/ssh to edit the file. All this applies only if the remote system is unix/linux.