Please bottom post....
> Create a form for upload (you may also use CGI.pm to create the form)
> like this:
>
> <form name="upload" action="myperl.pl" enctype="multipart/form-data"
> method="post">
> <input type="file" name=" ">
> <input type="submit" value= "ok">
> </form>
>
>
> myperl.pl
>
> use CGI (:standard);
>
> my $file = param("file_to_upload");
> my $destination = "any_name.txt";
Please look at the preferred method for handling uploads in CGI.pm's docs.
>
> # Open a file handle to write the upload file.
>
> Open (FH, ">/path/$destination");
Always check that open succeeded.
open (FH, ">/path/$destination") or die "Can't open file for writing: $!";
>
> while (<$file>){
>
> print FH -$_;
> }
>
> close FH;
>
>
> You may also use "read or sysread".
> See perldoc -f read for details
>
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>