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
- $hash{$_}++ David Gilden
- Re: $hash{$_}++ Martin van-Eerde
- Re: $hash{$_}++ Paul
- Re: $hash{$_}++ Brett W. McCoy
- Re: $hash{$_}++ Peter Scott
- Re: $hash{$_}++ Brett W. McCoy
- Re: $hash{$_}++ David Gilden
- Re: $hash{$_}++ Chas Owens
- RE: $hash{$_}++ Dave Cross
- RE: $hash{$_}++ Peter Cornelius
- RE: $hash{$_}++ Chas Owens
- Re: $hash{$_}++ Me
- RE: $hash{$_}++ Brett W. McCoy
- Re: $hash{$_}++ Randal L. Schwartz
