CheckDigits::MXX_001(3pm) | User Contributed Perl Documentation | CheckDigits::MXX_001(3pm) |
CheckDigits::MXX_001 - compute check digits for PA (DE)
use Algorithm::CheckDigits; $pa = CheckDigits('pa_de'); if ($pa->is_valid('2406055684D<<6810203<0705109<6')) { # do something } $cn = $pa->complete('240605568_D<<681020_<070510_<_'); # $cn = '2406055684D<<6810203<0705109<6' $cd = $pa->checkdigit('2406055684D<<6810203<0705109<6'); # $cd = '6' $bn = $pa->basenumber('2406055684D<<6810203<0705109<6'); # $bn = '240605568_D<<681020_<070510_<_'
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>
Aaron W. West pointed me to a fault in the computing of the check digit.
perl, CheckDigits, www.pruefziffernberechnung.de, www.export911.com/e911/coding/upcChar.htm, www.adams1.com/pub/russadam/upccode.html, http://www.upcdatabase.com.
2021-01-03 | perl v5.32.0 |