-----Original Message-----
From: Uri Guttman [mailto:[EMAIL PROTECTED]
$> so specify your data and its use better. how many are there in each
list
$> to be hashed?
The application that I'm looking into this for, has 1000 chars per
string. [Though in a separate offline discussion w/ Greg London, he
convinced me that I could probably pack this into a ~400 char string.] I
need to maintain a running list of unique instances of this string,
hence the use of the string as a key to a hash. Here's some pseudocode
that describes the usage:
my %unique_inst= ();
my $str;
my $mnemonic= "M00000";
while (<IFH>)
{
$str= &some_func($_);
$unique_inst{$str}= $mnemonic++ unless (exists
$unique_inst{$str});
&do_something($unique_inst{$str});
}
foreach (keys %unique_inst)
{ print "'$unique_inst{$_}' --> '$_'\n"; }
In a typical application, there are anywhere between 2000 - 20,000
unique instances of the string.
Thanks,
-Nilanjan
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm