CheckDigits::MXX_003(3pm) | User Contributed Perl Documentation | CheckDigits::MXX_003(3pm) |
CheckDigits::MXX_003 - compute check digits for DEM
use Algorithm::CheckDigits; $dem = CheckDigits('dem'); if ($dem->is_valid('GD0645027K1')) { # do something } $cn = $dem->complete('GD0645027K'); # $cn = 'GD0645027K1' $cd = $dem->checkdigit('GD0645027K1'); # $cd = '1' $bn = $dem->basenumber('GD0645027K1'); # $bn = 'GD0645027K'
The algorithm is a variation of the Verhoeff scheme.
For details look at the source.
Returns false otherwise,
Returns the complete number with check digit or '' if $number does not consist solely of digits and spaces.
Return '' otherwise.
Return '' otherwise.
None by default.
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
perl, CheckDigits, www.pruefziffernberechnung.de,
2008-05-17 | perl v5.10.0 |