in reply to Re: converting binary to decimal
in thread converting binary to decimal
my $decimal = (join '', map sprintf('%0*d', $size, $_), reverse @number) =~ s/0+(?=.)//r;
I don't know why I'm getting this error, and don't know how to fix it, because honestly, I don't even understand what this line does. I tried to remove this line entirely from the code and just "print join('-', @number);" but all I see is a list of very big numbers... and I don't even understand how the algorithm is supposed to work. In other words, I am completely lost at this one.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: converting binary to decimal
by ysth (Canon) on Jun 26, 2025 at 19:23 UTC | |
Re^3: converting binary to decimal
by hippo (Archbishop) on Jun 26, 2025 at 17:59 UTC | |
by harangzsolt33 (Deacon) on Jun 27, 2025 at 03:15 UTC | |
Re^3: converting binary to decimal
by tybalt89 (Monsignor) on Jun 26, 2025 at 19:41 UTC | |
by harangzsolt33 (Deacon) on Jun 27, 2025 at 03:13 UTC | |
by tybalt89 (Monsignor) on Jun 27, 2025 at 04:08 UTC | |
by harangzsolt33 (Deacon) on Jul 02, 2025 at 15:51 UTC | |
by tybalt89 (Monsignor) on Jul 02, 2025 at 16:30 UTC | |
|