chaitins_omega has asked for the wisdom of the Perl Monks concerning the following question:
How can I tell Perl not to interpret meta-characters in $string such that I could say, for example:/^$string/;
... and have the effect be that $_ is left-anchor searched for the uninterpolated text literal "$foo"? Thanks.$string = "\$foo"; /^$string/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Basic regex question
by runrig (Abbot) on Jul 18, 2007 at 19:26 UTC | |
|
Re: Basic regex question
by FunkyMonk (Bishop) on Jul 18, 2007 at 19:27 UTC |