Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.jpl.nasa.gov (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: unpack query. Message-ID: <1991Apr25.175420.25527@jpl-devvax.jpl.nasa.gov> Date: 25 Apr 91 17:54:20 GMT References: <1991Apr23.202307.2454@kfw.COM> <1991Apr24.002156.7082@jpl-devvax.jpl.nasa.gov> <1991Apr25.085953.29117@newcastle.ac.uk> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 13 In article <1991Apr25.085953.29117@newcastle.ac.uk> des0mpw@colman.newcastle.ac.uk (M.P. Ward) writes: : Why isn't "HH" the same as "H2" in unpack? An example: : : print unpack("H2","A"); gives "41" as expected : print unpack("HH","A"); gives "4" as unexpected! : : This is with perl version 4.0, Patch level: 3, SunOs 4.1, Sun 3/80 H, h, B and b always align to a byte boundary when they're done. It just seemed a little silly to keep track of where in the current byte we were, I guess. Larry