有没有办法在替换中使用变量作为修饰符?
my $search = 'looking'; my $replace = '"find: $1 ="'; my $modifier = 'ee'; s/$search/$replace/$modifier;
我需要使用哈希数组来使用不同的修饰符进行批量搜索替换.
regex variables perl modifier substitution
modifier ×1
perl ×1
regex ×1
substitution ×1
variables ×1