On Mon, Jun 18, 2001 at 05:34:29PM -0400, David Gilden ([EMAIL PROTECTED]) 
wrote:
> How about a an example or 2 where you would use this,
> 
> $hash{$_}++

# count the occurences of values in an array
my %hash;

$hash{$_}++ foreach @array;

# and display the results sorted
print map { "$_: $hash{$_}\n" } 
      sort { $hash{$b} <=> $hash{$a} } keys %hash;


hth,

Dave...

-- 

  Don't dream it... be it

Reply via email to