stephanm has asked for the wisdom of the Perl Monks concerning the following question:
What's a good way to not have the caret be taken for an anchor? Thanks.$p = $s = "^xxx"; print "$p has $s\n" if $s =~ /$p/; #does not print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching patterns containing a caret
by almut (Canon) on Apr 26, 2009 at 09:54 UTC | |
|
Re: Matching patterns containing a caret
by stephanm (Sexton) on Apr 26, 2009 at 11:49 UTC | |
|
Re: Matching patterns containing a caret
by jwkrahn (Abbot) on Apr 26, 2009 at 15:58 UTC | |
|
Re: Matching patterns containing a caret
by janusmccarthy (Novice) on Apr 26, 2009 at 10:05 UTC | |
by almut (Canon) on Apr 26, 2009 at 10:15 UTC | |
by chromatic (Archbishop) on Apr 26, 2009 at 23:03 UTC |