Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

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

NAME
CheckDigits::M10_008 - compute check digits for Sedol (GB) SYNOPSIS
use Algorithm::CheckDigits; $sedol = CheckDigits('sedol'); if ($sedol->is_valid('0123457')) { # do something } $cn = $sedol->complete('012345'); # $cn = '0123457' $cd = $sedol->checkdigit('0123457'); # $cd = '7' $bn = $sedol->basenumber('0123457'); # $bn = '012345' DESCRIPTION
ALGORITHM 1. Beginning left all numbers are weighted with 1,3,1,7,3,9 and 1 (checkdigit) 2. The sum of all products is computed. 3. The check digit is the difference of the sum from step 3 to the next multiple of 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::M10_008(3pm)

Check Out this Related Man Page

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

NAME
CheckDigits::M10_006 - compute check digits for Rentenversicherung (DE) SYNOPSIS
use Algorithm::CheckDigits; $rv = CheckDigits('rentenversicherung'); if ($rv->is_valid('65180539W001')) { # do something } $cn = $rv->complete('65180539W00'); # $cn = '65180539W001' $cd = $rv->checkdigit('65180539W001'); # $cd = '1' $bn = $rv->basenumber('65180539W001'); # $bn = '65180539W00' DESCRIPTION
ALGORITHM 1. The letter is replaced with a two-figure number appropriate to the position of the letter in the german alphabet. 2. Beginning left all numbers are weighted with 2,1,2,5,7,1,2,1,2,1,2,1. 3. The the total of the digits of all products is computed. 4. The check digit is sum 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. perl v5.10.0 2008-05-17 CheckDigits::M10_006(3pm)
Man Page

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unix Arithmatic operation issue , datatype issue

Hi, I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ). Eg: 0000001 0000220 0001235 0000022 0000023 ........... ......... ........ Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies

2. Shell Programming and Scripting

Test Hexadecimal number

Hi, I would like test if a number (with 2 digit, for example a9 , 0b ) is a hexadecimal number with 2 digit ? (2 Replies)
Discussion started by: francis_tom
2 Replies

3. Programming

Find out 2^n+1 , where n is a 3 digit number

I have to write a c program which takes a 3 digit number n and calculates the value of (2^n)+1 and then determines the number is prime or not. I have tried to first calculate the value of 2^n and then adding one to it and then apply the logic of prime number. but the ultimate problem is that... (7 Replies)
Discussion started by: agrawal.prachi
7 Replies

4. 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

5. Shell Programming and Scripting

Timestamp conversion in PERL

Hi, I have a file as below I need to overwrite the 2 nd column alone to numeric format like "06122011030414012345" as per the timestamp value output file should be the microseconds can be neglected if required. Any help will be appreciated. Thanks in advance (1 Reply)
Discussion started by: irudayaraj
1 Replies

6. 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