Help for this page
#!/usr/bin/perl -w use strict; ... #...snipped out the original checkUPC here to save space... print &checkUPC("142687305632"), "\n"; print &checkUPCrobot("142687305632"), "\n";
# returns error message on failure, undefined value on success sub checkUPCrobot2 ... my $chk2 = 10 - ($mult%10); return "invalid checkdigit...should be $chk2" if $check!=$chk2; }