Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!ncar!ames!pacbell.com!pacbell!well!gregs From: gregs@well.sf.ca.us (Greg Strockbine) Newsgroups: comp.lang.perl Subject: hex numbers, bit ands, shifting Message-ID: <23492@well.sf.ca.us> Date: 8 Mar 91 06:57:22 GMT Lines: 14 I need some help with this one. I'm trying to write a perl script to interpret hex memory dumps. How do I deal with hex numbers and shifting and bitwise anding, I'm getting confused, I have perl 3.0, patch level 12, Vax 6420. I fed "B000" to a perl script that did something like this: $word = "B000"; print ($word & 0xF000) >> 12, "/n"; and I get 0. How come I didn't get B? Any help is greatly appreciated. greg strockbine, dataproducts, woodland hills, ca.