htmanning has asked for the wisdom of the Perl Monks concerning the following question:
I have a database of phrases that I'm checking a string against. Perl recognizes all periods as spaces even if I don't want it to. What is the workaround for this?
The above recognizes "club.market" and "club market" but I only want to recognize the one with the period. What am I missing?$phrase = "club.market"; if ($string =~ m/$phrase/i){
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl treats period as space in string
by choroba (Cardinal) on Jul 20, 2021 at 20:48 UTC | |
|
Re: Perl treats period as space in string
by tybalt89 (Monsignor) on Jul 20, 2021 at 20:14 UTC | |
by htmanning (Friar) on Jul 20, 2021 at 20:29 UTC | |
by ikegami (Patriarch) on Jul 22, 2021 at 04:03 UTC | |
|
Re: Perl treats period as space in string
by GrandFather (Saint) on Jul 20, 2021 at 20:59 UTC | |
|
Re: Perl treats period as space in string
by AnomalousMonk (Archbishop) on Jul 21, 2021 at 00:57 UTC | |
by parv (Parson) on Jul 21, 2021 at 01:18 UTC | |
by Fletch (Bishop) on Jul 21, 2021 at 05:46 UTC | |
|
Re: Perl treats period as space in string
by perlfan (Parson) on Jul 20, 2021 at 22:07 UTC | |
by BillKSmith (Monsignor) on Jul 21, 2021 at 18:49 UTC |