# Output everything including the header if invoked as a CGI script if ( $0 =~ /\.cgi$/ ){ print header; $fh = *STDOUT; } else { # If invoked via symlink (not ending in ".cgi"), write "mirrors.html" open Mirr, ">mirrors.html" or die "Can't open mirrors.html: $!\n"; $fh = *Mirr; } # print $fh start_html( "Linux Gazette - Mirrors and translations page" ), $t -> output, end_html; print $fh $t -> output, end_html;