CheckDigits::M10_011(3pm) | User Contributed Perl Documentation | CheckDigits::M10_011(3pm) |
CheckDigits::M10_011 - compute check digits UPS (US)
use Algorithm::CheckDigits; $ups = CheckDigits('ups'); if ($ups->is_valid('1Z 591580 68 55587736')) { # do something } $cn = $ups->complete('1Z 591580 68 5558773'); # $cn = '1Z 591580 68 55587736' $cd = $ups->checkdigit('1Z 591580 68 55587736'); # $cd = '6' $bn = $ups->basenumber('1Z 591580 68 55587736'); # $bn = '1Z 591580 68 5558773'
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 |