Help for this page
$possibly_safe = "^!|~¦¡£\0"; $mystery_str = '$a !~ /qr^some|thing^'; $mystery_str =~ tr!/!!d; # make eval interpolation safe eval "(\$safe = \$possibly_safe) =~ tr/$mystery_str//d"; print $safe; # "¦¡£\0"
$possibly_safe = "^!|~¦¡£\0"; $mystery_str = '$a !~ qr^some|thing^'; eval "(\$safe = \$possibly_safe) =~ tr/$mystery_str//d"; print $safe; # "¦¡£\0"