my $content = $q->param( 'content' ); if (!$content){ print $q->header,"no damn content"; exit; } #### #!/usr/local/bin/perl -w use strict; use CGI; my $q = new CGI; my $path_to_top = "/home/somesite/www/site/main_frame_top3.html"; my $content = $q->param( 'content' ); my $TITLE="Welcome to New Orleans"; my @top_file; my $script_name; my $path_info = $q->path_info; print $q->header; # If no path information is provided, then we create # a side-by-side frame set if (!$path_info) { &print_frameset; exit 0; } &print_html_header; &print_top if $path_info=~/top/; &print_mainframe if $path_info=~/main/; &print_end; # Create the frameset sub print_frameset { $script_name = $q->script_name; print <$TITLE EOF ; exit 0; } sub print_html_header { print $q->start_html($TITLE); } sub print_end { print $q->end_html; } sub print_top { open (FH, "$path_to_top") or die "where's the damn file? : $!"; @top_file = ; close FH; print @top_file; } sub print_mainframe { print "starting to open $content"; open (OH, "$content") or die "where's the damn file? : $!"; my @bot_file = ; close OH; if (!@bot_file) { print "empty array! whassup wi'dat?"; exit; } else { print "the array is @bot_file!"; exit; } print @bot_file; print "finish"; }