in reply to Re: Need help with CGI::Upload
in thread Need help with CGI::Upload
Since you have already loaded CGI.pm ... why not use CGI::upload ... it's a whole lot easier. Here is a short example that you can modify (add error checking, etc.).
#!/usr/bin/perl -T use strict; use HTML::Entities; use CGI qw(:standard); print header, start_multipart_form, filefield('file'), submit('go'), end_form, ; if (param('go')) { my $fh = upload('file'); print hr, pre( map { encode_entities $_ } <$fh>); }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|