use strict; use CGI qw(:standard); print header, print start_html("test"), hr(); if (param("name")) { my $name = param("name"); #the problem seems to be here i have tried print end_html() #that didn't work eather any ideas open (TMP, ">textfile"); print TMP $name; close (TMP); } else { print start_form(); print p("Type your name", textfield("name")); print p(submit("Submit")); } print hr(); print end_html();