$|++; sub MainHandler { my ($request, $response) = @_; $response->code(RC_OK); $response->content( get_content($request) ); return RC_OK; } sub get_content { my $request = shift; my $my_content; $my_content = start_html( -title => $request->uri, -head => header_css() ); $my_content .= end_html(); return $my_content; } ########### ########### sub header_css { my @css_style_sheets = ("http://othermachine/css/standard.css", "http://othermachine/css/ssd.css"); ### in order to support multiple style sheets, ### we need to explicitly run CGI Link() ### we link only to those style sheets that ### actually exist my $css_link = ""; foreach (@css_style_sheets) { $css_link .= Link({ -rel => 'stylesheet', -type => 'text/css', -href => $_ }); } return $css_link; }