Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Binary Coded Decimal

by Anonymous Monk
on Sep 18, 2012 at 01:44 UTC ( #994166=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    sub encode_BCD {
        return pack 'H*', join '', @_
  2. or download this
    0001 0010 0011 0100 0101 0110 0111 1101
    $ perl -le " print join q/ /, unpack q/(A4)*/, unpack q/B*/, pack q/H*
    +/, q/1234567-/ "
    0001 0010 0011 0100 0101 0110 0111 1101

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994166]
[Lady_Aleena]: Hello everyone. I'm having a blonde moment. I can push an array to an array, right? push @to_array, @another_array;
[shmem]: of course
[shmem]: the members of @another_array are conflated to @array
[shmem]: try it out:
[Lady_Aleena]: shmem, thanks. I'm am way out of practice.
[shmem]: perl -lE '@foo = (0..3);@bar = (4..7); push @foo,@bar; say for @foo'

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2017-04-27 11:26 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (503 votes). Check out past polls.