in reply to string on right side of m//?
It is also legal to use a number or another variable wherever you might use a regex:
$s = '0123456789';; print $s =~ 0;; 1 $r = 123;; print $s =~ $r;; 1
Whatever you put there, perl will try to resolve as a regex.
The downside is that you can't use modifiers without // or m//.
|
|---|