PLEASE note: These pages are here solely for historic purposes. New articles have not been written since 2001; many links in the index are broken; and most ahref.com email addresses will now bounce. Try visiting ep Productions, Incorporated, the web programming and development company behind this site.

Tip: ahref.com is by developers, for developers. Tell us what you want to see here.

web index ahref.com: a community space for web developers------ -----
IndexToolsCareersTalk
ahref.com > Guides > Technology

Technology Guide

Building a Site Submission Program, Continued

Finishing Up

Line 101 adds some final formatting to the program output, and line 102 calls the subroutine which actually sends out the output. Line 103 finishes the program.

101 $output_string .= "</BLOCKQUOTE>";
102 &show_output ($output_string);
103 exit;

The output subroutine, on lines 105-118, is fairly standard. It opens the header file, prints its contents to the screen; prints the output string, which has been accumulating text throughout the program; and opens the footer file and prints out its contents.

105 sub show_output {
106   my $output_string = shift (@_);
107   open HEADER or die "Can't find file $HEADER: $!\n";
108   while (<HEADER>) {
109     print $_;
110   }
111   close HEADER;
112   print $output_string;
113   open FOOTER or die "Can't find file $FOOTER: $!\n";
114   while (<FOOTER>) {
115     print $_;
116   }
117   close FOOTER;
118 }
continue reading >>>
or jump to a topic:

Introduction
Preliminaries
Input Validation
Defining the Search Engines
More Variable Setup
Making the Submissions
Finishing Up
Things to Keep in Mind


view a printable version of this article


To suggest a topic, please email guides@ahref.com.

 


HOME ||| ABOUT AHREF.COM ||| ADVERTISE ||| FEEDBACK ||| SEARCH THIS SITE ||| CONTRIBUTE

© 1998-1999 ep Productions, Inc. All rights reserved. Terms of use.