#!c:/xampp/perl/bin/perl.exe use CGI qw(:all); use strict; use warnings; my $cgi = new CGI; my $text = param ('value1'); my $windows = param ('value2'); output($cgi, $text, $windows); exit; ######################################################### ######################################################### sub output{ my $cgi = shift; my $text = shift; my $window = shift; my $style = get_style(); print $cgi -> header; print $cgi -> start_html( -style => {-code => $style}, ); print $cgi -> div ( {-id => $window}, $text ); print $cgi -> end_html; } sub get_style { my $style = <<"EOSTYLE"; body { margin:0; padding:0;} div { border:1px;} \#login { width:512px; height:150px; position:absolute; left:0px; top:0px; color:green; } \#info { width:512px; height:150px; position:absolute; left:512px; top:0px; color:red; } \#filter { width:200px; height:150px; position:absolute; left:0px; top:150px; color:black; } \#toplist { width:200px; height:468px; position:absolute; left:0px; top:300px; color:magenta; } \#output { width:824px; height:618px; position:absolute; left:150px; top:200px; color:blue; } EOSTYLE return $style; }