且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在正则表达式匹配中检测标量的确切字符串值

更新时间:2023-02-26 09:24:19

选择一个:

  1. $foo = quotemeta("bar.baz");
  2. if ($other =~ m/\Q$foo/)

(两者实际上是同一件事,只是在不同的时间完成.)

(Both are actually the same thing, just done at different times.)