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]