On Sunday, May 19, 2002, at 09:58 , Octavian Rasnita wrote:
> I don't know the map function.
>
> Teddy,
> [EMAIL PROTECTED]
I think the short answer is:
this is a good thing for the moment.
perldoc -f map
if that does the 'fast make of a hash or list' from a list
that works fo
I don't know the map function.
Teddy,
[EMAIL PROTECTED]
- Original Message -
From: "drieux" <[EMAIL PROTECTED]>
To: "cgi cgi-list" <[EMAIL PROTECTED]>
Sent: Monday, May 20, 2002 7:25 AM
Subject: Re: Counting the elements of an array
On Sund
Bob Showalter wrote:
> > -Original Message-
> > From: drieux [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, May 20, 2002 3:01 PM
> > To: cgi cgi-list
> > Subject: Re: Counting the elements of an array
> >
> >
> >
> > O
> -Original Message-
> From: drieux [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 20, 2002 3:01 PM
> To: cgi cgi-list
> Subject: Re: Counting the elements of an array
>
>
>
> On Monday, May 20, 2002, at 08:13 , Bob Showalter wrote:
> >> -Ori
On Monday, May 20, 2002, at 08:13 , Bob Showalter wrote:
>> -Original Message-
>> From: drieux [mailto:[EMAIL PROTECTED]]
>>
>>#
>>#
>>sub haveMap {
>> my (@list) = @_;
>> my %seen = ();
>>
>> map {$seen{$_}++} @list;
>
> So, is the old s
> -Original Message-
> From: drieux [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, May 19, 2002 11:47 AM
> To: cgi
> Subject: Re: Counting the elements of an array
>
> ...
> ok, so my OCD is benchmarking - but I would like to offer
> what I think may be a bit quic
On Sunday, May 19, 2002, at 06:29 , Octavian Rasnita wrote:
> I couldn't understand anything, but thank you very much! :-)
my apologies - how can I help make it more understandable?
> I could use the other solutions very easy, but now I have another problem.
better a solution than None!
> I
gt;
To: "cgi" <[EMAIL PROTECTED]>
Sent: Sunday, May 19, 2002 6:47 PM
Subject: Re: Counting the elements of an array
On Saturday, May 18, 2002, at 07:09 , Tagore Smith wrote:
> You're on the right track. Try something like this:
>
> my @array=("aaa", "
On Sunday, May 19, 2002, at 02:38 , Tagore Smith wrote:
> drieux wrote:
[..]
>> http://www.wetware.com/drieux/pbl/BenchMarks/uniqCounts.txt
>>
>> ok, so my OCD is benchmarking -
Tagore - thanks for the review - and I fear we agree,
although I feel I owe you some clarifications;
[..]
> and makin
drieux wrote:
> On Saturday, May 18, 2002, at 07:09 , Tagore Smith wrote:
>
> > You're on the right track. Try something like this:
> >
> > my @array=("aaa", "aaa", "bbb", "bbb", "aaa", "ccc", "aaa", "bbb",
"ccc")
> > my %hash;
> >
> > foreach my $item (@array){
> > $hash{$item}++;
> > }
> >
On Saturday, May 18, 2002, at 07:09 , Tagore Smith wrote:
> You're on the right track. Try something like this:
>
> my @array=("aaa", "aaa", "bbb", "bbb", "aaa", "ccc", "aaa", "bbb", "ccc")
> my %hash;
>
> foreach my $item (@array){
> $hash{$item}++;
> }
>
> Tagore Smith
http://www.wetware.
Octavian Rasnita wrote:
> I have an array with values like:
> my @array=("aaa", "aaa", "bbb", "bbb", "aaa", "ccc", "aaa", "bbb", "ccc",
> );
>
> I want to count how many "aaa" and how many "bbb" and how many "ccc" and
how
> many "..." I have in that array.I would like to
> have a hash with s
Hi all,
I have an array with values like:
my @array=("aaa", "aaa", "bbb", "bbb", "aaa", "ccc", "aaa", "bbb", "ccc",
);
I want to count how many "aaa" and how many "bbb" and how many "ccc" and how
many "..." I have in that array.I would like to
have a hash with something like:
%hash=(
aaa =>
13 matches
Mail list logo