Help for this page

Select Code to Download


  1. or download this
    #! perl
    use strict;
    ...
    printf "You have infected %d %s: ", $answerinfect,
                                       ($answerinfect == 1) ? 'person' : '
    +people';
    print join(', ', sort map { $_->{name} } grep { $_->{status} == SICK }
    + @pop);
    
  2. or download this
    How many random infections? (Enter a number between 1 and 4):
    2
    ...
              }
            ];
    You have infected 2 people: Barney, Betty