Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.lang.perl Subject: Re: Bug on Sun 3's (Perl 4.000) Message-ID: <127635@uunet.UU.NET> Date: 6 Apr 91 00:05:49 GMT References: Organization: UUNET Communications Services, Falls Church, VA Lines: 28 In article mitch@hq.af.mil (Mitch Wright) writes: ?Well, ? I think I've found a bug, though I'm hoping that I've just done ?something wrong. Your hope is justified. ?This program works on my Sun386i (SunOS 4.0.2) just fine, but refuses to ?work on our Sun 3/180S under SunOS 4.1. No, it just works differently. ?#!/usr/gnu/perl ?# ?print unpack("H2", pack("I", 97)); ? ? ?On the 386i it prints 61 as expected [by me at least]. ? ?On the Sun 3/180, it prints 00. One is Big Endian, the other Little Endian. To see the difference, change "H2" to "H2H2H2H2" and run on both machines. -- [rbj@uunet 1] stty sane unknown mode: sane