Beefy Boxes and Bandwidth Generously Provided by pair Networks
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
in thread How can I access a file on a remote server? by Kspoon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-25 07:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found