RE: Grep Weirdness

2004-10-07 Thread Bob Showalter
Kent, Mr. John (Contractor) wrote: ... > my(@ACTIVE) = qw {gid240 gid278 gid301}; > my(@LOGGED) = qw {gid306 gid240 gid278 gid301}; > > # This doesn't work, finds a match for every item in > # LOGGED, seems to be matching on "gid" but ignoring the number > foreach (@LOGGED){ > unless (grep /$

Re: Grep Weirdness

2004-10-07 Thread JupiterHost.Net
Kent, Mr. John (Contractor) wrote: Greetings, Hello, Encountering some unexpected behavior illustrated in the code snippet below. In the first foreach loop Seems like when I check for a match between gid306 and the contents of the the ACTIVES array I get an erroneous hit. But as shown in the secon

Re: Grep Weirdness

2004-10-07 Thread Gunnar Hjalmarsson
Mr. John Kent wrote: Encountering some unexpected behavior illustrated in the code snippet below. In the first foreach loop Seems like when I check for a match between gid306 and the contents of the the ACTIVES array I get an erroneous hit. Is this a bug in Perl or in my understanding? You missed