Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!charyb!dan From: dan@kfw.COM (Dan Mick) Newsgroups: comp.lang.perl Subject: Unsigned ints in Perl Summary: unsigned processing impossible? Message-ID: <1990Sep24.005715.24738@kfw.COM> Date: 24 Sep 90 00:57:15 GMT Reply-To: dan@kfw.com (Dan Mick) Organization: KFW Corporation, Newbury Park, CA Lines: 16 I asked this of Randal in email, 'cause I was embarrassed to admit I couldn't come up with anything on my own, and most of the current best solution is his idea. Anyway: How can I work with 32-bit integral quantities as unsigned numbers? If I use literals of the form 0xF0000000, for instance, or read input and convert with hex(), the numbers end up negative, and I can't seem to force them to positive except with $number = $number + 2**32 if ($number < 0) which seems unwieldy and time-consuming, though maybe it's not so much the latter. Sure seems like there'd be a better way, though; there usually is, in Perl. Any ideas? Anyone?