chennaiite has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: connect to central webserver and acces a file
by davidrw (Prior) on Aug 18, 2005 at 12:44 UTC
    What service (e.g. telnet or ssh server or windows file sharing or ftp server or web/cgi, etc) is running on the central server that will allow you to connect and modify files? You have to define that first then we can point you to the appropriate perl implementation. Also, what type of changes? If it's something simple a perl -i -pe '' command may suffice.. which brings up the question, is perl installed on the central server? If not, you'll have to pull the file back, make your changes, and push it back.
Re: connect to central webserver and acces a file
by anonymized user 468275 (Curate) on Aug 18, 2005 at 12:48 UTC
    If the changes are intended to be done manually, as opposed to having a regular and predictable form, then it seems extreme overkill to use perl, rather than a normal ftp access to the directory.

    Otherwise, for automated changes, perl does not provide off-the-shelf scripts, rather CPAN provides modules to assist the programmer in writing such scripts. In this case, Net::FTP provides an o-o model that is easy to use (provided you know the basics of perl o-o programming).

    Update: Some code has arrived in the OP meanwhile, but it could do with some code tags.

    One world, one people

Re: connect to central webserver and acces a file
by anonymized user 468275 (Curate) on Aug 18, 2005 at 15:44 UTC
    I can't install Net in my daily environment, but there are a few ways to narrow this down:

    - it would help if we can see what output is sent to STDOUT and what to STDERR.

    - similarly what is the output to channels 1 and 2 when you try it with a telnet session instead of using perl.

    One world, one people

Re: connect to central webserver and acces a file
by larryp (Deacon) on Aug 18, 2005 at 15:24 UTC

    Please take a look at Writeup Formatting Tips to learn how to format your posts properly. In this case, please pay special attention to the section on <code> tags.

    Closely following those guidelines will help you get your questions answered more quickly...and it will help other monks in answering them.