in reply to Re: Multi @array searches
in thread Multi @array searches
Those two solutions differ quite a bit. Something closer to the original would be:
because split " " actually splits on any amount of whitespace while ignoring both leading and trailing spaces.$terms =~ s/^\s*//; $terms =~ s/\s*$//; $terms =~ s/\s+/|/g;
Of course, if you can guarantee that the input has no lead, trailing, nor repeated spaces (and no zero-width terms), then your solution would work.
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: Multi @array searches
by jorg (Friar) on Mar 22, 2001 at 22:49 UTC |