"; print ""; &end; } # modified file is being replaced with the older one: if ($input{'file'} ne "") { $html = $input{'html'}; $html =~ s/\<\*textarea\>/<\/textarea>/; open (FILE, ">$input{'file'}"); print FILE $html; close FILE; } # the forms and html stuff print "
\n"; print "\n"; print "
\n"; &end; # This places the file into the textarea. # inside the textarea give me a little headache # because of its premature ending. # But I solved it like this: sub get_file { open (FILE, "<$input{'selected'}"); while(($thisrow =)) { $thisrow =~ s/\<\/textarea\>/\<\*textarea\>/; print $thisrow; } close FILE; } # the pull down menu: sub pull_down { print "
\n"; print " \n"; } # the header sub start { open (HOWTEMP, "<$how_temp"); while(($thisrow =)) { push(@howtemplate, $thisrow); } close HOWTEMP; @howtemplate = split("%%HOW HERE%%", join("\n", @howtemplate)); print $howtemplate[0]; } # the end of the html text sub end { print $howtemplate[1]; exit; } ############################### # FORM PARSE ############################### sub readparse { read(STDIN,$user_string,$ENV{'CONTENT_LENGTH'}); if (length($ENV{'QUERY_STRING'})>0) {$user_string=$ENV{'QUERY_STRING'}}; $user_string =~ s/\+/ /g; @name_value_pairs = split(/&/,$user_string); foreach $name_value_pair (@name_value_pairs) { ($keyword,$value) = split(/=/,$name_value_pair); $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C",hex($1))/ge; $input{$keyword} = $value; } }