in reply to Re^2: Comparing string to array elements
in thread Comparing string to array elements
Ok, I was overlooking something. I was comparing a whole set of free text to an array of terms, no wonder why it didn't return anything.
Can the solution be splitting that free text into an array, and then comparing that to the terms I already have, printing the matches?
my @adv = split /\s+/, $1;
How would I compare if each term in @adv matches one on @terms, and then print it if it exists?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Comparing string to array elements
by hippo (Archbishop) on Jan 13, 2017 at 15:34 UTC | |
|
Re^4: Comparing string to array elements
by Lotus1 (Vicar) on Jan 13, 2017 at 21:14 UTC |