in reply to Stop variable expansion
my $Name = '[A'; my $SearchInHere = 'FredJimBert'; if (-1 != index $SearchInHere, $Name) { DoSomething(); }
> so I can't escape it.
Of course you can. See quotemeta. But I still think using the above solution is better.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Stop variable expansion
by SteveDC (Initiate) on Mar 19, 2021 at 03:20 UTC | |
by AnomalousMonk (Archbishop) on Mar 19, 2021 at 06:05 UTC | |
|
Re^2: Stop variable expansion
by SteveDC (Initiate) on Mar 19, 2021 at 03:24 UTC | |
by GrandFather (Saint) on Mar 19, 2021 at 03:38 UTC |