Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> Unfortunately, Algorithm::LUHN supports some odd inputs, like non-numeric strings
Careful, is this algorithm well defined for input >=10 !?! From the docs: > For example, Standard & Poor's maps A..Z to 10..35 so the LIST to add these valid characters would be (A, 10, B, 11, C, 12, ...) provided B=11 is on an odd position, what's the formula now to reduce 2*11? cross total is 4, but 22-9 =13 and if it's even does 11 stay 11 with cross total 2 or do you take it module 10 hence resulting in 1?
Cheers Rolf
In reply to Re^10: Faster Luhn Check Digit Calculation?
by LanX
|
|