Title: Count how often a certain element occurs in an array
Does Christian and christian and CHristian equate to
the same? I am assuming yes.
One way:
open(FILENAMES,"<$filenames") || die "uanble to open file $filenames:
$!";
my %MyNames = ();
my $in = 0;
$hash{$_}++ foreach ( @array );
print "$_ => $hash{$_}" foreach ( keys %hash );
___
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Eugene Hiamov
-Original Message-From: Mumper, Jay
[mailto:[EMAIL PROTECTED]]Sent: Thursday, June 06,
2002 11:10 AMTo: 'Heiko Nieke';
[EMAIL PROTECTED]Subject: RE: Count how often a
certain element occurs in an array
Something like
my
- Jay
Mumper
-Original Message-From: Heiko Nieke
[mailto:[EMAIL PROTECTED]] Sent: Thursday, June 06, 2002 11:03
AMTo: [EMAIL PROTECTED]Subject: Count
how often a certain element occurs in an array
Hi,
It might be a silly question, but I am new to perl
and I need to solve
Title: Count how often a certain element occurs in an array
Hi,
It might be a silly question, but I am new to perl and I need to solve the following problem
- I have a list with approx. 40 names
for example:
Christian
Sally
Christian
Klaus
Now I need to know how often