Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

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

by RichardK (Parson)
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

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1024564]
[choroba]: csh considered harmful
[erix]: no, I'm using bash :)
[marioroy]: :)
[marioroy]: I use the default and happens to be bash
[erix]: heh, I like the "Resolved" (Christiansen is really funny)
Discipulus is makita a reincarnation of grinder?
[erix]: I probably also need to understand TAP a bit better than I do

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-03-23 08:31 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (285 votes). Check out past polls.