Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Encoding BCD

by Corion (Pope)
on Jun 13, 2007 at 15:49 UTC ( #621007=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    if ($test1 = $test2) {
       $comp = "EQUALS";
    }  else  {
       $comp = "Does NOT Equal";
  2. or download this
    my $test1 = 123;
    my $test2 = 456;
       $comp = "Does NOT Equal";
    print "3. Test1: '$test1', test2: '$test2'\n";
  3. or download this
    =head2 C<decode_COMP3>
        else { $digits .= $sign; $sign = '?' };
  4. or download this
    sub decode_BCD {
        unpack "H*", $_[0];
  5. or download this
    use strict;
    use Test::More tests => 4;
    is decode_BCD("\x12\x34\x56","123456");
    is decode_BCD("\x00\x34\x56","003456");
    is decode_BCD("\x12","12");

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://621007]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2016-02-14 10:15 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (470 votes), past polls