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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.