Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: How does perl's file I/O work?

by Anonymous Monk
on Jan 21, 2003 at 15:19 UTC ( [id://228703]=note: print w/replies, xml ) Need Help??


in reply to Re: How does perl's file I/O work?
in thread How can I access a file on a remote server?

I will check it out, thanks a lot. Is there any reason why telnet is not a suitable solution? Because I find that Net::Telnet might just do the job, I don't know how to use it yet but it seems like it allows me to make client connections to a TCP port and do network I/O, especially to a port using the TELNET protocol. I don't know if it provides any I/O methods but like, so far I have these code at least these will work for connecting:
use Net::Telnet (); $t = new Net::Telnet (Timeout => 10, Prompt => '/ksh\$ $/'); $t->open($host); $t->login($username, $passwd);
is this correct? What to do after taht I don't know, hopefully I can find out by doing more research, but this seems like it owuld do the job, what do you think? Kelvin

Replies are listed 'Best First'.
Re: Re: Re: How does perl's file I/O work?
by Gilimanjaro (Hermit) on Jan 21, 2003 at 20:52 UTC
    Problem is that after establishing the telnet session, the other side of the connection is just a login shell waiting for input. You could use that shell to dump the file and store the input locally, but there is a problem.

    System messages can be sent to a terminal session by the server, which would then show up in the middle of your file. I'm talking about things like 'You have new mail' or 'System will go down for maintenance' and the such.

    If your workstation is a Unix machine, I would suggest buying your sysadmin a pizza and asking him to allow you to connect to your homedir using nfs. If it's a windows machine, do the same after installing an nfs-client for Windows.

    NFS allows you to 'mount' the filesystem on your local machine, making it 'look' local to all your applications. After doing that you could access the file in any way you would want...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://228703]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-20 01:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found