Help for this page

Select Code to Download


  1. or download this
    my %count;
    foreach my $animal in (@zooanimals) {
    ...
       $count{$animal_name}++;
    }
    # another loop here to print %count.
    
  2. or download this
    sub add_animal() {
       my $type = shift;
    ...
    __OUTPUT__
    There are 2 Llamas in the zoo.
    There are 1 Camels in the zoo.