use CGI qw/:standard/; open OUTPUT,">$outputFile"; print OUTPUT header, start_html('Created By Perl'), h1('Created By Perl'), hr, p("If you see this text is that it is working well"), hr, end_html; close OUTPUT;