Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open files for reading from another server 1

Status
Not open for further replies.

carlosAlberto

IS-IT--Management
Oct 9, 2001
109
0
0
GB
Hi all,

Is is possible to open a file for reading that is located on a different linux server?????


Thanks,

Carl.
 
Jim,

I was trying to keep it as simple as possible.

I thought it might of been possible to use the open command with the name of another server.

i.e. open (INFILE, '10.10.10.2' '/files/mse.xml');

(I know the above line is VERY wrong, i thought it may help for demonstration) ;-)


Any ideas????


Thanks for your help.

Carl.
 
does perl have a module for something like rcp?

I'm pretty sure perl filehandles have to work within the local filesystem, so if you can mount the remote system into the local, it's work easily, but I'm doubting you can.

You could also try the FTP modules, but that's a lot more code to open a connection, authenticate, put/get the file, etc. With as simple as rcp works from the command line, I'd assume a module for it would be just as simple.

For that matter, could you just make a system call and use it? There should be a secure version of rcp that works over ssh, but I don't know it's unix name. The windows port I use is PSCP by the same folks who made PuTTY. ----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
Jaa,

That fits the definition of a Frequently Asked Question very nicely indeed. I can't count the number of times I've seen that one.

You going to make a FAQ of it? Mike

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

It's like this; even samurai have teddy bears, and even teddy bears get drunk.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top