Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: numbers masking

by jwkrahn (Monsignor)
on May 16, 2012 at 22:14 UTC ( #970942=note: print w/ replies, xml ) Need Help??


in reply to numbers masking

$ perl -le' my @numbers = ( "541321069873210200", "5413 21069873210200" ); my $start_at = 6; my $end_digits = 4; for ( @numbers ) { print; my @digits; push @digits, \substr $_, $-[0], 1 while /[0-9]/g; splice @digits, 0, $start_at; splice @digits, -$end_digits; $$_ = "X" for @digits; print; } ' 541321069873210200 541321XXXXXXXX0200 5413 21069873210200 5413 21XXXXXXXX0200


Comment on Re: numbers masking
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://970942]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2014-09-24 04:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (245 votes), past polls