Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!relay.nswc.navy.mil!zogwarg!anneb From: anneb@zogwarg.etl.army.mil (Anne Brink) Newsgroups: comp.lang.perl Subject: Can anyone duplicate this? vec() headaches. Keywords: stopped working Message-ID: <629@zogwarg.etl.army.mil> Date: 18 Apr 91 18:06:26 GMT Distribution: na Organization: Engineer Topographic Labs, Ft. Belvoir, VA Lines: 53 Sorry to bother you all, but I've no Perl guru locally to pester. This works under 3.044, but not 4.003. Am I doing something wrong, or did I make some configuration errors? #!/usr/local/bin/perl vec($one,2,1) = 1; vec($two,2,1) = 1; print ord($one),"\n"; # debug stmt print ord($two),"\n"; # ditto. $three = $one & $two; print ord($three),"\n"; # should print 4. if ($one & $two) { print "right\n"; } else { print "wrong.\n"; } In 3.044, I get 4 4 4 right but in 4.003, I get 4 4 0 wrong. The Camel book (under the select() section, actually) seems to indicate that my code should work. I am running on SunOS 4.1, compiled with cc -O1 -DDEBUGGING. It passed all the tests. Thanks for any help, -Anne -- ############################################################################### Anne Brink # Most of our lives are spent in Plan "B" anneb@etl.army.mil # ###############################################################################