<form action="cgi-bin/concepts2.pl" method="post" enctype="multipart/form-data">
as your opening form tag. The default encoding type for HTML/HTTP forms is "application/x-www-form-urlencoded" rather than "multipart/form-data", but the latter is necessary for file upload.
Also, whenever you don't see all the output you expect, try setting autoflush. Put $|++; in somewhere near the top of your code. This applies not only to CGI programming, but to any time you are Suffering from Buffering.
Another tip to remember about CGI programming is that CGI::Carp is your friend, especially when you use it like this during debugging:
use CGI::Carp qw( fatalsToBrowser );
Be aware, though, that it gives some information away when it encounters a fatal error which could give an attacker helpful hints. Many people suggest using that feature only during development and not in production.
In reply to Re: Passing a file from a form, processing, and then outputting as html
by mr_mischief
in thread Passing a file from a form, processing, and then outputting as html
by bobekdj
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |