Array always compares equal

2008-08-03 Thread hsfrey
I'm trying to set up a list of words to ignore in a text. I tried it like this: my @ignore = ("U.S.C", "Corp", "Miss", "Conf", "Cong"); and later in a loop if ( $exists $ignore [$lastWord] ) { next;} But that tested positive for EVERY $lastWord and skipped every time ! It did the same when I us

Re: Array always compares equal

2008-08-03 Thread Mr. Shawn H. Corey
On Sat, 2008-08-02 at 06:31 -0700, hsfrey wrote: > I'm trying to set up a list of words to ignore in a text. > I tried it like this: > > my @ignore = ("U.S.C", "Corp", "Miss", "Conf", "Cong"); > > and later in a loop > > if ( $exists $ignore [$lastWord] ) { next;} > > But that tested positive f

Re: Array always compares equal

2008-08-04 Thread John W. Krahn
Mr. Shawn H. Corey wrote: On Sat, 2008-08-02 at 06:31 -0700, hsfrey wrote: I'm trying to set up a list of words to ignore in a text. I tried it like this: my @ignore = ("U.S.C", "Corp", "Miss", "Conf", "Cong"); and later in a loop if ( $exists $ignore [$lastWord] ) { next;} But that tested p