in reply to Re^3: numbers masking
in thread numbers masking

$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/;