NAME

Number::Closest - find number(s) closest to a number in a list of numbers

SYNOPSIS

use Number::Closest;

my $closest = Number::Closest->new(number => $num, numbers => \@num) ;

my $closest_two = $closest->find(2) ;  # gives arrayref of two closest numbers in list

SEE ALSO

http://stackoverflow.com/questions/445782/finding-closest-match-in-collection-of-numbers

AUTHOR

Terrence Brannon, <tbone at cpan.org>

BUGS

Please report any bugs or feature requests to bug-number-closest at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Number-Closest. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Number::Closest

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2009 Terrence Brannon, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.