Torsten Hofmann wrote:
Jon Bjornstad wrote:
You will write a program to generate ballots. The program will be
invoked like this:
elect.pl [-r] [permutation] [district-number] [namefile]
(Items in [square brackets] are optional.)
The command line arguments are a bit ambigous. What does
elect.pl file
or
elect.pl -r file
mean??
Is file the permutation file and the namefile is read from STDIN?
Or is the default permutation file ('randlet.txt') used and file is the
namefile? Does this change for the 2nd line (with option '-r')?
I interpreted the [permutation] to mean that you fed the program the
entire permutation there on the command line, and the file randlet.txt
was the _only_ file possibly used for storing the permutation.
So,
elect.pl -r file
would generate a new randlet.txt, use it since no custom perm was given,
and then read names from file. Whereas
elect.pl -r qwertyuiopasdfghjklzxcvbnm
would generate a new randlet.txt, but use qw..nm for sorting, and read
names off STDIN.
-- Rod
|