# # Program: makeseed.pl # by J. David Eisenberg # # PURPOSE: # ======== # This program assists in setting up amateur wrestling tournaments. # It takes a file of competitors, organized by school, and produces # output files organized by weight class. These files are used to # produce printed bracket sheets for the tournament. # # INPUT: # ====== # The input file, named all_teams.txt, contains all team rosters. # Each roster starts with the team name on a single line by itself, # followed by competitor weights and names (one line each). # # Weights and names are separated by whitespace. If a wrestler is # seeded, the seed number is separated from the name by a slash, with # optional whitespace on either side of the slash. Example: # # Peoria High School # 103 Joe Schemegeggie # 112 John Doe/2 # 119 Juan Fulano # # PROCESSING: # =========== # The program builds a hash of hashes. The primary hash has # weight class as its key; the value is a secondary hash whose # key is a school name, and whose value is a person's name (and seed). # # OUTPUT: # ======= # One file for each weight class. File name has format seednnn.txt, # where "nnn" is the weight class. The first line in the file # duplicates the weight class number, and is followed by all the # competitors at that weight (one line each), in the format # # name, school, seed # # Thus, John Doe (above) would appear in file seed112.txt on a # line reading: # # John Doe, Peoria High School, 2 #
Note: there is another way to create multi-line comments without
having to use a #
on each line. Put this line before
your comments:
=begin COMMENTS
...and these lines after your comments:
=end COMMENTS =cut
The equal sign must be in column one! Using this method, the comments above could be written as:
=begin COMMENTS Program: makeseed.pl by J. David Eisenberg PURPOSE: ======== This program assists in setting up amateur wrestling tournaments. It takes a file of competitors, organized by school, and produces output files organized by weight class. These files are used to produce printed bracket sheets for the tournament. INPUT: ====== The input file, named all.txt, contains all team rosters. Each roster starts with the team name on a single line by itself, followed by competitor weights and names (one line each). Weights and names are separated by whitespace. If a wrestler is seeded, the seed number is separated from the name by a slash, with optional whitespace on either side of the slash. Example: Peoria High School 103 Joe Schemegeggie 112 John Doe/2 119 Juan Fulano PROCESSING: =========== The program builds a hash of hashes. The primary hash has weight class as its key; the value is a secondary hash whose key is a school name, and whose value is a person's name (and seed). OUTPUT: ======= One file for each weight class. File name has format seednnn.txt, where "nnn" is the weight class. The first line in the file duplicates the weight class number, and is followed by all the competitors at that weight (one line each), in the format name, school, seed Thus, John Doe (above) would appear in file seed112.txt on a line reading: John Doe, Peoria High School, 2 =end COMMENTS =cut