$begin .= substr $num, 0, 1, q{} until 7 == $begin =~ tr/[0- +9]//; ... $end = substr($num, -1, 1, q{}) . $end until 5 == $end =~ tr/[0- +9//; ... $num =~ tr/[0-9]/X/;
You are including the [ and ] characters but the OP only wants to change numerical digits.
$begin .= substr $num, 0, 1, q{} until 7 == $begin =~ tr/0-9 +//; ... $end = substr($num, -1, 1, q{}) . $end until 5 == $end =~ tr/0-9 +//; ... $num =~ tr/0-9/X/;
In reply to Re^4: numbers masking
by jwkrahn
in thread numbers masking
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |