in reply to Re: Converting Binary to hex
in thread Converting Binary to hex

... assigning a numeric value to $binaddr, but treating it as though it contained the string '100010' ...

But isn't the stringization of 100,010 (decimal) exactly '100010'?

c:\@Work\Perl\monks>perl -wMstrict -MData::Dump -le "my $n = 100_010; my $b = qq{0b$n}; dd $n, $b; " (100010, "0b100010")
In this case, quoting is not needed.


Give a man a fish:  <%-{-{-{-<

Replies are listed 'Best First'.
Re^3: Converting Binary to hex
by Anonymous Monk on Oct 01, 2016 at 01:21 UTC
    :) no
    printf '%b', 100_010; __END__ 11000011010101010