Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: How to use perl digest module to calculate CRC?

by RichardK (Priest)
on Mar 20, 2013 at 16:12 UTC ( #1024564=note: print w/ replies, xml ) Need Help??


in reply to How to use perl digest module to calculate CRC?

Exactly what is your input data? is it the hex number 0x1e5, (485 decimal), or the string "0x1e5" ?

Perl handles these two differently so try running these one liners, and it might make things clearer

perl -E 'my $x=0x1e5; say $x;' # will print 485 perl -E 'my $x="0x1e5"; say $x;' #will print 0x1e5


Comment on Re: How to use perl digest module to calculate CRC?
Download Code
Re^2: How to use perl digest module to calculate CRC?
by guyra (Novice) on Mar 21, 2013 at 08:24 UTC

    My input data is actualy 1e5

    Meaning it is 0001 1110 0101

    Eventtually I'm going to have a long file with bytes in hex which I need to calculate CRC on.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2014-07-25 11:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (170 votes), past polls