I have the following code for masking numbers
my $len = length $Number; substr($Number, 6, $len - 10) = 'X' x ($len - 10);
Through this code i can i show the first 6 and last 4 digits eg:541321069873210200 is masked as 541321XXXXXXXX0200. But the problem is that when there is a seperator in between the numbers that is also counted as a result of which 5413 21069873210200 is masked as 5413 2XXXXXXXXX0200which only shows the first 5 digits instead of 6.
Please help
In reply to numbers masking by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |