Access a remote computer using perl

Dear all,

Where can i find documentation on how to access a remote computer using a perl script? I search to the internet but i can not find something straightforward to this issue.
Which is the easiest way to do that?
What i would like to do is to access a remote computer access a directory there and manipulate some files.

Best Regards,
Christos

How do you want to access those files? Telnet? RSH? SSH? CIFS? NFS?
For the first three, decide on one, go to search.cpan.org, and search for the appropriate Net::* module
For the other two, take a look at man mount

Which is the easiest way to access a remote pc and manipulate remote file using perl?
TELNET SSH or RSH?

They're probably the same, and you should probably use ssh due to the fact that telnet sends information in plain text.

So i guess that when the remote connection is established the remain part of perl code will be executed in the remote computer normally, manipulating the remote files like they way that it would be executed if the perl code was running in the local pc.
Is this correct?

No, absolutely not. The Perl code will still run and operate on the local machine and data. The only thing Net::SSH, Net::Telnet, etc. provide is a way to send shell commands to a remote machine, just as if you'd open an interactive remote session. Think of it as "scripted ssh".

If you want to execute something on the remote machine, create an independent script, copy it to the remote machine, and call it there. Or you build yourself some kind of RPC/MPI mechanism.