#!/usr/bin/perl -w use strict; use warnings; use CGI; use CGI::Carp qw(fatalsToBrowser); #errors will show in the browser my $newStyle; my $co=new CGI; print $co->header, $co->start_html( -title=>'fileupload.cgi', -BGCOLOR=>'#FFFFFF', -style=>{-src=>'http://localhost/html/stylesheet.css', -code=>$newStyle} ), $co->start_multipart_form( -method=>'POST', -action=>"fileupload2.cgi", -enctype=>"multipart/form-data", ), $co->p, $co->filefield( -name => 'file', -default => "starting value", -size => 30, -maxlength => 80, ), http://localhost/html/add.bmp", -value => "starting value", ), $co->p, $co->image_button( -name => "submit", -src => "http://localhost/html/add.bmp", ), $co->end_multipart_form; $co->end_html; exit 0;