Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

algorithm::checkdigits::m10_002(3pm) [debian man page]

CheckDigits::M10_002(3pm)				User Contributed Perl Documentation				 CheckDigits::M10_002(3pm)

NAME
CheckDigits::M10_002 - compute check digits for CINS (US), SIREN (FR), SIRET (FR) SYNOPSIS
use Algorithm::CheckDigits; $siret = CheckDigits('siret'); if ($siret->is_valid('73282932000074')) { # do something } $cn = $siret->complete('7328293200007'); # $cn = '73282932000074' $cd = $siret->checkdigit('73282932000074'); # $cd = '4' $bn = $siret->basenumber('73282932000074'); # $bn = '7328293200007' DESCRIPTION
ALGORITHM 1. Beginning right all numbers are weighted alternatively 1 and 2. 2. The total of the digits of all products is computed. 3. The sum of step 3 ist taken modulo 10. 4. The check digit is the difference between 10 and the number from step 3 taken modulo 10. METHODS is_valid($number) Returns true only if $number consists solely of numbers and the last digit is a valid check digit according to the algorithm given above. Returns false otherwise, complete($number) The check digit for $number is computed and concatenated to the end of $number. Returns the complete number with check digit or '' if $number does not consist solely of digits and spaces. basenumber($number) Returns the basenumber of $number if $number has a valid check digit. Return '' otherwise. checkdigit($number) Returns the checkdigit of $number if $number has a valid check digit. Return '' otherwise. EXPORT None by default. AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de> SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de. www.dsi.cnrs.fr/bureau_qualite/admindonnees/documents/siren.pdf perl v5.10.0 2008-05-17 CheckDigits::M10_002(3pm)

Check Out this Related Man Page

CheckDigits::MXX_004(3pm)				User Contributed Perl Documentation				 CheckDigits::MXX_004(3pm)

NAME
CheckDigits::MXX_004 - compute check digits for VAT RN (AT) SYNOPSIS
use Algorithm::CheckDigits; $vat = CheckDigits('ustid_at'); if ($vat->is_valid('U13585627')) { # do something } $cn = $vat->complete('U1358562'); # $cn = 'U13585627' $cd = $vat->checkdigit('U13585627'); # $cd = '7' $bn = $vat->basenumber('U13585627'); # $bn = 'U1358562' DESCRIPTION
ALGORITHM 1. Beginning right all numbers before the check digit are weighted alternatively 1 and 2. 2. The total of the digits of all products is computed and then subtracted from 96. 3. The check digit is the sum of step 3 taken modulo 10. METHODS is_valid($number) Returns true only if $number consists solely of numbers and the last digit is a valid check digit according to the algorithm given above. Returns false otherwise, complete($number) The check digit for $number is computed and concatenated to the end of $number. Returns the complete number with check digit or '' if $number does not consist solely of digits and spaces. basenumber($number) Returns the basenumber of $number if $number has a valid check digit. Return '' otherwise. checkdigit($number) Returns the checkdigit of $number if $number has a valid check digit. Return '' otherwise. EXPORT None by default. AUTHOR
Mathias Weidner, <mathias@weidner.in-bad-schmiedeberg.de> SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de. perl v5.10.0 2008-05-17 CheckDigits::MXX_004(3pm)
Man Page

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script problem

How could I write a script to combine the like check numbers and add their charges, to create one line per check number with a total charge. example of lines: check # check date charge 11211 01/03/06 10.00 11212 01/03/06 ... (3 Replies)
Discussion started by: tdavenpo
3 Replies

2. Shell Programming and Scripting

Help with numbers

Say I have 3 sets of numbers: 043 5326 90432 and I want to select the digits that all 3 have in common! so to answer my question 3 is the only digit that all 3 have in common! Can this be done with 1 command in unix shell? or is it more complicated than I think it is? I don't want an answer... (3 Replies)
Discussion started by: puttster
3 Replies

3. Programming

6 digits combination

Is there any program that can create 6 digit numbers with: (DIGIT_1)+(DIGIT_2)+(DIGIT_3)+(DIGIT_4)+(DIGIT_5)+(DIGIT_6)=10 Any perl or C also can. Anyone can help me? Thank you (6 Replies)
Discussion started by: Tzeronone
6 Replies

4. Shell Programming and Scripting

How to check the index file given in a package file?

I have an index file.txt and it consists of pdf files. I have to check the file exist based on A(it follows 8 digits) or B (it follows 9 digits).Please help with Linux Shell Scripting. I had tried below code but it shows an error. ... (0 Replies)
Discussion started by: pavand
0 Replies