in reply to Re: Binary to decimal conversion
in thread Binary to decimal conversion

That looks at lot like the lines 153-162 from here (direct link here):
153 // read number 154 function readNumber(){ 155 $num = fread($this->buffer, 8); 156 $r = ""; 157 for($byte = 7 ; $byte >= 0 ; $byte--) { // reverse the bytes 158 $r .= $num[$byte]; 159 } 160 $ret = unpack("dnum",$r); 161 return $ret['num']; 162 }
And I believe that's PHP, not Perl. I'm thankful for the suggestion although still looking for the Perl equivalent of the above.
--
Andreas

Replies are listed 'Best First'.
Re^3: Binary to decimal conversion
by Anonymous Monk on Dec 11, 2007 at 10:06 UTC
    Translate that to perl, its easy