nadadogg has asked for the wisdom of the Perl Monks concerning the following question:
In some parts, there is an offset as well, which I understand how to work with. The problem I'm hitting is that I do not know how to emulate this in perl. The HD command on our old Unix machine was set like this:cc=`hd -bx -s 29 -n 3 <"$filename"|tr -d '[ " " ]'|awk '{print $2}'`
I found this module that had something similar to what I'm trying to do, but I don't understand how to use it. Any help is much appreciated. How do I convert between decimal and binary?hd-- display files in a hexadecimal format hd [ -format (bx is binary)] [ -s(offset)] [-n (count)] [filename] tr - translate characters the -d Deletes all input characters in the input string.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Picking certain values to convert from binary to decimal
by Zaxo (Archbishop) on Jan 03, 2004 at 19:53 UTC | |
by nadadogg (Acolyte) on Jan 08, 2004 at 14:51 UTC |