在perl文本中,替换非常简单和强大.我想做一个带有变量替换的脚本,例如:
if ( $IgnoreCase ) {$opt = "gi"} else {$opt = "g"} $string =~ s/$source/$replace/$opt;
结果是:
Scalar找到了运营商的预期......
是否有可能做选项变量?
perl replace
perl ×1
replace ×1