CheckDigits::M11_009(3pm) | User Contributed Perl Documentation | CheckDigits::M11_009(3pm) |
CheckDigits::M11_009 - compute check digits NRIC (SG)
use Algorithm::CheckDigits; $nric = CheckDigits('nric_sg'); if ($nric->is_valid('S1234567D')) { # do something } $cn = $nric->complete('S1234567'); # $cn = 'S1234567D' $cd = $nric->checkdigit('S1234567D'); # $cd = 'D' $bn = $nric->basenumber('S1234567D'); # $bn = 'S1234567';
@cd = ('','A','B','C','D','E','F','G','H','I','Z','J', );
Returns false otherwise,
Returns the complete number with check digit or '' if $number does not consist solely of digits, hyphens and spaces.
Return '' otherwise.
Return undef otherwise.
None by default.
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de>
perl, CheckDigits, www.pruefziffernberechnung.de,
2021-01-03 | perl v5.32.0 |