Bernhard writes ..

>Hi! I'm using a html form, where you can enter a file (a 
>picture) and upload it, but when i send the form the Perl 
>script only gets the local Adress of the file, but not the 
>Data (so the picture) of the file. How can i save the picture 
>in a new file on my Disk?
>I have programmed it so that the new file will be saved in a 
>new Folder.

if you use the standard CGI module that's shipped with the later versions of
Perl then that parameter is both the filename and a filehandle to the file
contents

as well since version 2.47 of CGI.pm there's an additional method called
'upload' which explicitly retrieves the filehandle

see the CGI documentation for an example of the file-upload mechanism


references:

  perldoc CGI

-- 
  jason king

  In Denmark, if a horse carriage is trying to pass a car and the horse
  gets uneasy, the car is required to pull over and stop. If necessary
  to ease the horse down, you are required to cover the car up. -
  http://dumblaws.com/

Reply via email to