Algorithm-LUHN
view release on metacpan or search on metacpan
lib/Algorithm/LUHN.pm view on Meta::CPAN
print "$_ => $vc{$_}\n";
}
Algorithm::LUHN::valid_chars(map {$_ => ord($_)-ord('A')+10} A..Z);
$c = check_digit("A2C4E6G8");
print "It worked again\n" if is_valid("A2C4E6G8$c");
=head1 DESCRIPTION
This module calculates the Modulus 10 Double Add Double checksum, also known as
the LUHN Formula. This algorithm is used to verify credit card numbers and
Standard & Poor's security identifiers such as CUSIP's and CSIN's.
You can find plenty of information about the algorithm by searching the web for
"modulus 10 double add double".
=head1 FUNCTION
=over 4
=cut
( run in 0.634 second using v1.01-cache-2.11-cpan-73692580452 )