Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!sdd.hp.com!wuarchive!uunet!convex!usenet From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.lang.perl Subject: Re: does perl have an "in" operator? Message-ID: <1991May16.160119.4446@convex.com> Date: 16 May 91 16:01:19 GMT References: <1991May15.153547.9282@iwarp.intel.com> Sender: usenet@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Distribution: comp Organization: CONVEX Software Development, Richardson, TX Lines: 18 Nntp-Posting-Host: pixel.convex.com From the keyboard of weg@convx1.ccit.arizona.edu (Eythan Weg): :Can this work too? : : @array = ( 1, 2, 3 ); : print "found one\n" if grep(/1/, @array); : print "found four\n" if grep(/4/, @array); : Consider: @array = ( 2..20 ); print "found one\n" if grep(/1/, @array); --tom -- Tom Christiansen tchrist@convex.com convex!tchrist "So much mail, so little time."