Help for this page

Select Code to Download


  1. or download this
    Stored Zoo data:
    Llama - Feet:4 - Color:Tan
    Camel - Feet:4 - Humps:2
    
  2. or download this
    #[pseudocode - will not compile]
    foreach $line (<FILE>) {
    ...
       my $newanimal = new Animal($name, $animalstats);
       push (@allanimals, $newanimal);
    }
    
  3. or download this
    __DATA__
    Llamas:
    ...
    $animalstats);
      }
    }
    
  4. or download this
    package Animal;
    sub new (
    ...
        return new Animal::Generic($name, $data);
      }
    }
    
  5. or download this
    foreach $type (keys $allanimals) {
      my $num_of_animals = $allanimals{$type}->count_collection(); # A met
    +hod in Animal::Colelction
    ...
         $animal->feed();
      }
    }