#!c:\perl\bin\perl -w BEGIN { $|=1; use CGI::Carp('fatalsToBrowser'); } use strict; use CGI qw(:standard); my $script = "sample.pl"; my $cgi = new CGI; my $path_info = $cgi -> path_info; my $status = $cgi -> param("status"); print $cgi->header(); set_frame() if ! $path_info; top_frame() if $path_info =~ /Top/; bottom_frame() if $path_info =~ /Bottom/; sub set_frame { print frameset( {-rows => "33%,66%"}, frame({-name => "Top", -src => $script . "/Top"}), frame({-name => "Bottom", -src => $script . "/Bottom"}) ); } sub top_frame { print $cgi->start_html(); print $cgi->startform(-action=>"$script/Bottom",-TARGET=>"Bottom"); print 'Top Frame Text'; print ' '; print ''; print $cgi->end_html(); } sub bottom_frame { print $cgi->start_html(-head=>meta({-http_equiv => 'Refresh', -content => '5'})); print 'Bottom Frame Text'; print $cgi->end_html(); }