And I believe that's PHP, not Perl. I'm thankful for the suggestion although still looking for the Perl equivalent of the above.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 }
In reply to Re^2: Binary to decimal conversion
by andreas1234567
in thread Binary to decimal conversion
by andreas1234567
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |