#!/usr/bin/perl
#Program name: example8.pl
#   array
@pets = ("dog", "cat", "parrot", "hamster");
$petCount = $#pets + 1;
print ("I have $petCount number of pets\n");
print ("My pets are:\n");
print ("$pets[0]\n");
print ("$pets[1]\n");
print ("$pets[2]\n");
print ("$pets[3]\n");
