Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!hplabs!hpcc01!okamoto From: okamoto@hpcc01.HP.COM (Jeff Okamoto) Newsgroups: comp.lang.perl Subject: Possible bug with shifting an array Message-ID: <12150004@hpcc01.HP.COM> Date: 13 Aug 90 21:34:58 GMT Organization: Tendou Dojo Lines: 22 I got around this problem by doing a grep, but it's puzzling. Larry, can you confirm if this is a programming error or a bug? (I'm at patchlevel 18.) #!/usr/bin/perl $i = 0; @a = ( "", "", "Hello" ); while($a[0] == "" && $i < 100) { shift(@a); $i++; } print "Found it at position $i\n"; -- \ oo The New Number Who, \____|\mm Jeff Okamoto //_//\ \_\ HP Corporate Computing & Services /K-9/ \/_/ okamoto@hpccc.corp.hp.com /___/_____\ ..!hplabs!hpccc!okamoto ----------- (415) 857-6236