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

hi is there a way to write a program in perl through which we can IMPORT files on our local system to some other server ,the script will be at server side only ,any pointers regarding this , looking forward for a favorable response from ur side regards, rahul
  • Comment on perl program for importing files on local system

Replies are listed 'Best First'.
Re: perl program for importing files on local system
by zentara (Cardinal) on Jan 28, 2009 at 13:19 UTC
Re: perl program for importing files on local system
by marto (Cardinal) on Jan 28, 2009 at 13:21 UTC

    Depending on the configuration of your local system your server may be able to connect to it, but you don't give us any details of either the server or local system.

    Would it not make more sense for your local system to send files to the server since it is more likely to run something like FTP/SFTP server?

    Martin

      actually ,i am working on CMS called Interwoven teamsite ,there i need to develop a script written in perl/cgi which is really on client side only ,the script should display (i dont no how)some sort of screen through which user can select and upload this file to the local system only,pls igmore regarding server side issues,any pointers regarding this ?. regards, rahul

        Hi rahulgsp83,

        If I understand you correctly you have some sort of CMS system that runs on a server that users access via a browser? Or does "perl/cgi which is really on client side only" mean that this system installs on client machines?

        If this actually runs from a server then there are many posts here regards file uploading, for example Re: I need a simple web upload script. (super search for more examples).

        Martin

Re: perl program for importing files on local system
by Bloodnok (Vicar) on Jan 28, 2009 at 13:56 UTC
    Is rsync(1) - for which there are web, as well as GUI, front-ends - of no use ?? ... It's invariably better not to re-invent the wheel unless there's either no alternative or an educational/learning need.

    A user level that continues to overstate my experience :-))
Re: perl program for importing files on local system
by Corion (Patriarch) on Jan 28, 2009 at 14:00 UTC

    If your CMS already has an upload facility, maybe you want to automate that through WWW::Mechanize?