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

Hi,

I host a CGI page in linux server. Using that page the user will fill the form and also browse the supporting document

My problem is: If the user browse the supporting document and click the submit button, in the next page iam coping the supporting document to the linux system. In this User will use windows system to fill the form. So Iam unable to copy the file what the user selected from windows to linux.

I used File::Copy to copy the file.

Any one suggest me how to copy this.

Regards,

Balaji
  • Comment on copy a file from windows to linux system

Replies are listed 'Best First'.
Re: copy a file from windows to linux system
by marto (Cardinal) on Jun 08, 2010 at 09:46 UTC

    By the sounds of it what you are saying is you want to upload a file from the users computer which they select, on to your linux server which hosts the CGI page? If this is the case see the CGI documentation relating to uploading files.

      Thanku morto, i will check this...
Re: copy a file from windows to linux system
by moritz (Cardinal) on Jun 08, 2010 at 09:44 UTC
    You can't use File::Copy across the network unless there's a shared network file system on which the file is.

    If that's not the case, you need to use the upload facilities described in CGI.

    Perl 6 - links to (nearly) everything that is Perl 6.