Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: Binary to decimal conversion

by andreas1234567 (Vicar)
on Dec 11, 2007 at 09:45 UTC ( [id://656359]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://656359]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (7)
As of 2024-04-23 19:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found