Re: parsing of 8bit binary data bitwise

2006-11-09 Thread Mumia W.
On 11/09/2006 07:04 AM, Dharshana Eswaran wrote: Rajeev, Actually, i get data in hex bytes from a log file. I have to parse them or analyze them according to some predefined rules or values. For eg: a hex byte of 0xa4 is converted to binary as 10100100 Now, i have a file in which the values ar

Re: parsing of 8bit binary data bitwise

2006-11-09 Thread Dharshana Eswaran
Rob, my $i; printf "%-4s => %s\n", $fields[$i++], $_ foreach qw/abc def lmn/; These are arbitrary values. Thanks for the kind and immediate response. I sincerely appreciate it. Thanks and Regards, Dharshana On 11/9/06, Rob Dixon <[EMAIL PROTECTED]> wrote: Dharshana Eswaran wrote: > Hi all,

Re: parsing of 8bit binary data bitwise

2006-11-09 Thread Dharshana Eswaran
Rajeev, Actually, i get data in hex bytes from a log file. I have to parse them or analyze them according to some predefined rules or values. For eg: a hex byte of 0xa4 is converted to binary as 10100100 Now, i have a file in which the values are predefined. It looks like 0xa4 => 10100100 in

Re: parsing of 8bit binary data bitwise

2006-11-09 Thread Rob Dixon
Dharshana Eswaran wrote: Hi all, I wanted to know how to parse a 8bit binary data bitwise? I have my input in hex and i convert it into binary form using the following logic: %h2b = (0 => "", 1 => "0001", 2 => "0010", 3 => "0011", 4 => "0100", 5 => "0101", 6 => "0110", 7 => "0111", 8 =>

parsing of 8bit binary data bitwise

2006-11-09 Thread Dharshana Eswaran
Hi all, I wanted to know how to parse a 8bit binary data bitwise? I have my input in hex and i convert it into binary form using the following logic: %h2b = (0 => "", 1 => "0001", 2 => "0010", 3 => "0011", 4 => "0100", 5 => "0101", 6 => "0110", 7 => "0111", 8 => "1000", 9 => "1001", a => "1