English     Español
[Main Index] : Programming : Languages : Perl : CPAN Modules : Data Type Utilities : Math
 Math::HashSum CPAN (Perl) Module 

Search

 

Documents

Math::HashSum - Sum a list of key-value pairs on a per-key basis (Displayed)
README 

Math::HashSum - Sum a list of key-value pairs on a per-key basis


NAME

Math::HashSum - Sum a list of key-value pairs on a per-key basis


SYNOPSIS

  use Math::HashSum qw(hashsum);
  
  my %hash1 = (a=>.1, b=>.4); 
  my %hash2 = (a=>.2, b=>.5);
  my %sum = hashsum(%hash1,%hash2);
  
  print "$sum{a}\n"; # Prints .3
  print "$sum{b}\n"; # Prints .9


DESCRIPTION

This module allows you to sum a list of key-value pairs on a per-key basis. It adds up all the values associated with each key in the given list and returns a hash containing the sum associated with each key.

The example in the synopsis should explain usage of the module effectively.


AUTHORS

David James <david@jamesgang.com>


SEE ALSO

the Math::VecStat manpage, the Lingua::EN::Segmenter::TextTiling manpage for an example of this module in use


LICENSE

  Copyright (c) 2002 David James
  All rights reserved.
  This program is free software; you can redistribute it and/or
  modify it under the same terms as Perl itself.
  
=cut

Information

This site is currently in testing, it is not yet operating using the full database. Until it is officially launched you may wish to visit Help-Site Computer Manuals. After launch, this site (HelpSpy) will replace Help-Site. Information about the spider which is currently trawling the Internet looking for links to add to this directory can be found here.
   

©Copyright Nicholas Reynolds 2004