Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!sun-barr!newstop!male!anywhere.EBay.Sun.COM!me From: me@anywhere.EBay.Sun.COM (Wayne Thompson - IR Workstation Support SE) Newsgroups: comp.lang.perl Subject: if ($i in @array) Message-ID: <3992@male.EBay.Sun.COM> Date: 25 Nov 90 15:06:52 GMT Sender: news@male.EBay.Sun.COM Lines: 23 I think it was Larry who mentioned that such a construct would be nice. While reworking some code I replaced: $found = 0; for $user (@users) { if ($user eq $login) { $found = 1; last; } } unless ($found) { ... } with: unless ("@users" =~ /\b$login\b/) { ... } There's no equivalent for associtive arrays though. Wayne