The value inside $operator (supposed to "." in case of "11.5") is interpreted as special character inside regular expression. Escape its special meaning as following
$celldata=~m{(.+?)\Q$operator\E(.*)}You can better use split for this if you have only one "$operator" in a string
($left_str, $right_str) = split(/\Q$operator\E/, $celldata);In reply to Re: Something is wrong with this pattern
by samarzone
in thread Something is wrong with this pattern
by tej
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |