Uploading files

Does anyone know how to

1) make a form be able to upload binary files (I know there's something you have to put in the form tag, but I can't remember what)

2) use Perl to get that data and write it to a file

For uploading pictures to a web page, etc.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hi oucher
Well you can use Net::Ftp module to upload/Download files to and from a Server..
Tell me if you need more help

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
oucherAuthor Commented:
Okay, I'm sure that'll work.  But I know I've seen it done before without using any modules, I just can't remember how.  I would prefer to do it without using a module if I could.  Any ideas?
Here comes the answer:

<form method="POST" name="AddForm" action="/cgi/upload.pl" enctype="multipart/form-data">
 <input type="file" name="upload">
 <input type="submit" name="B1">

of course you have to suply your own perl script. Free ones can be downloaded from many pages. Here comes a good link:


When I once wrote an upload service I forgot to set the enctype field in the form tag... THAT IS VERY IMPORTANT.

ENCTYPE must be set to: multipart/form-data

(enctype="multipart/form-data") to make it work.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.