#!/usr/bin/perl
@foo= ("apple","orange","pear","pear","mango","apple");
for (@foo) {
$bar{$_}++;
}
while ( ($k,$v) = each %bar ) {
if ($v =~ 1){
print "$k appears $v time\n";
}
elsif ($v !=~ 1){
print "$k appears $v times\n";
}
}
The above code works nicely with a one column set of...