http://www.perlmonks.org?node_id=272835


in reply to cgi response

#!/usr/bin/perl use warnings; use strict; use CGI qw( :standard ); our $query = new CGI; our $method = $query->param("op"); print $query->header; print $query->start_html(-title=>'Fon'); unless ($method) { print $query->start_form(-method=>"POST"); print $query->textfield(-name=>'fon'); print $query->hidden(-name=>'op', -default=>"01"); print $query->submit('submit','submit'); print $query->endform; } else { my $fon = $query->param("fon"); open (OUT, ">fon.txt"); print OUT $fon, "\n"; close OUT; print "Your fon has been entered"; } print $query->end_html;