RE: hex2Bin

2003-08-18 Thread Kipp, James
> > > > $hex = 0xff; > > $bin = unpack("B32", pack("N", hex $hex)); > > The above assumes big-endian byteorder. For little-endian use > "V" instead > of "N". Or just use "L" when the file has the same byteorder as the > machine you are running this script on. > > Btw, the hex() above is probabl

Re: hex2Bin

2003-08-18 Thread Tassilo von Parseval
On Mon, Aug 18, 2003 at 07:34:41AM -0400 Kipp, James wrote: > > I have a file cointaing 1024 hex numbers . > > I want to convert them to Bin. > > Please help > > try something like this: > > $hex = 0xff; > $bin = unpack("B32", pack("N", hex $hex)); The above assumes big-endian byteorder. For

RE: hex2Bin

2003-08-18 Thread Kipp, James
> hi , > I have a file cointaing 1024 hex numbers . > I want to convert them to Bin. > Please help try something like this: $hex = 0xff; $bin = unpack("B32", pack("N", hex $hex)); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

hex2Bin

2003-08-18 Thread Sachin Mathur
hi , I have a file cointaing 1024 hex numbers . I want to convert them to Bin. Please help

RE: help:how to hex2bin,bin2hex,bin2dec,dec2bin

2003-01-17 Thread murphy, daniel (BMC Eng)
$out = sprintf "%o", unpack("N", pack("B32", substr("0" x 32 . $in, -32))); dec2bin: $out = unpack("B*", pack("N", $in)); dec2hex: $out = unpack("H8", pack("N", $in)); dec2oct: $out = sprintf "%o"

Re: help:how to hex2bin,bin2hex,bin2dec,dec2bin

2003-01-16 Thread billy
thanks! - Original Message - From: "simran" <[EMAIL PROTECTED]> To: "billy" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, January 17, 2003 10:11 AM Subject: Re: help:how to hex2bin,bin2hex,bin2dec,dec2bin > perldoc -f pac

Re: help:how to hex2bin,bin2hex,bin2dec,dec2bin

2003-01-16 Thread simran
perldoc -f pack perldoc -f unpack On Sun, 2038-01-17 at 12:55, billy wrote: > are there some commands or function? > thanks for your response. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

help:how to hex2bin,bin2hex,bin2dec,dec2bin

2003-01-16 Thread billy
are there some commands or function? thanks for your response.