Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

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

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

NAME
CheckDigits::MXX_003 - compute check digits for DEM SYNOPSIS
use Algorithm::CheckDigits; $dem = CheckDigits('dem'); if ($dem->is_valid('GD0645027K1')) { # do something } $cn = $dem->complete('GD0645027K'); # $cn = 'GD0645027K1' $cd = $dem->checkdigit('GD0645027K1'); # $cd = '1' $bn = $dem->basenumber('GD0645027K1'); # $bn = 'GD0645027K' DESCRIPTION
ALGORITHM The algorithm is a variation of the Verhoeff scheme. 0 All letters are changed to numbers. 1 All digits are permutated according to a permutation table. 2 The permutated digits are combined using a dieeder table. The first with the second, the result with the third, this result with the fourth and so on. 3 The result of the last combination in the dieeder table is in such a way combined that the result is 0 (zero). The number used for this combination is the checksum. For details look at the source. 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> THANKS
SEE ALSO
perl, CheckDigits, www.pruefziffernberechnung.de, perl v5.10.0 2008-05-17 CheckDigits::MXX_003(3pm)

Check Out this Related 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)
Man Page

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Jumpstart-Skript

Hallo, ich weiß nicht wie das hier ist mit dem Deutsch ist, aber da ich nur bedingt englisch spreche versuche ich es einmal so: Ich bin Azubi und habe noch nie mit Unix zutun gehabt, soll nun aber denen Jumpstart Server so einrichten das von ihm aus dem Netzwerk her gebootet werden kann... ... (1 Reply)
Discussion started by: JeyJey1779
1 Replies

2. UNIX for Dummies Questions & Answers

grep für bestimmten bereich

hallo, wie bekomme ich es mit dem greb befehl hin, nur eine bestimmten bereich zu prüfen. also einen substring in der art hab vor langen eine ganz einfach lösung mitgrep "^....gesehen und dann irgendwie den bereich festgelegt (1 Reply)
Discussion started by: Timmää
1 Replies

3. Shell Programming and Scripting

Coder für Uploadskript

Moin, ich suche jemanden der mir ein Skript erstellt ähnlich dem Steal the File Skript erstellt. Funktionen: - Download von FTP-Server - Automatisches entpacken und Automatisches Packen von Dateien - Eingabefeld für Passwort, Dateiname, Dateigröße + Automatisches packen im .rar format - Upload... (1 Reply)
Discussion started by: Ikarusik
1 Replies

4. Shell Programming and Scripting

Hilfe beim SCRIPT

Hallo, unter Suse Linux 11.2 / Kubuntu 10.04 habe ich mir ein Service-Menü angelegt. Bis auf das Nachfolgende funktioniert alles bestens. Bisher habe ich auf der Konsole mit dem Programm pdftk Anhänge an ein Pdf-File erzeugt. Der Code lautete pdftk beispiel.pdf attach_files Anlage1.pdf... (1 Reply)
Discussion started by: Hannes_007
1 Replies

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

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