# Scan the Simtel mirror file and generate HTML to include into # software.src # # The MIRRORS.TXT file contains lines that identify FTP addresses and names # for all of the Simtel mirror sites. This program generates HTML code that # presents the user with this list to allow one to go to one of the sites to # download some software. # # ----------------------------------------------------------------------------- require 5.004; use English; use strict; use Time::Local; my $mirror_file = "c:/Tom/INTERNET/HTML/HOME/MIRRORS.TXT"; my $line; my $ftp; my $location; my $sec; my $min; my $hour; my $mday; my $mon; my $year; if (open(MIRROR, "<$mirror_file")) { } else { print "Had trouble opening mirror file $mirror_file\n"; } while (<MIRROR>) { chomp; next if (length($_) < 25); $line = $_; $ftp = substr($line, 19); $location = substr($line, 0, 19); $location =~ /\s*$/; $location = $PREMATCH; next if (substr($ftp, 0, 3) ne "ftp"); print "<OPTION VALUE=\"$ftp\">$location\n"; } close(MIRROR); print q| </SELECT> <INPUT TYPE="button" NAME="button" Value="Go" onClick="moveto_simtel(this.form)"> <BR> |; ($sec,$min,$hour,$mday,$mon,$year) = localtime; $year += 1900; $mon++; printf("<small>revised %s-%02d-%02d</small>\n", $year, $mon, $mday);
Back to The Information Cave home page
Last modified Mon Apr 26 20:45:09 1999.