good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
First, try to mount the AIX machine's filesystems (at least the one with this file on it) on your machine. That means either NFS or SAMBA. Then just use it like a local file, and things will work.
If that's not an option, then you'll probably want to go FTP. use Net::FTP to open an FTP connection to the AIX machine, and query it for the size of the file. (Since it sounds like you're dealing with an ever-changing file) You'll need to hand-parse the data from the FTP directory listings, as there's no standard. If the file's changed, go fetch it and work on the local copy. If there's a webserver on the AIX machine, you could consider using LWP instead to fetch the file to the local machine and work on it there. If that's not an option either, you'll have to write some sort of widget to run on the remote machine and present the data to your program. This is a fairly straightforward client/server setup, so you can put any protocol you want in place. FWIW, with both LWP and Net::FTP, you don't have to have a local copy--you can work with the data as it streams in, but that can be a bit of a pain, so fetching a local copy's probably better. In reply to Re: How does perl's file I/O work?
by Elian
|
|