Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Find Credit Card Numbers and Mask only 6 digits in a logfile

by kcott (Chancellor)
on May 01, 2018 at 09:58 UTC ( #1213882=note: print w/replies, xml ) Need Help??


in reply to Find Credit Card Numbers and Mask only 6 digits in a logfile

G'day gtk,

I don't see how the size of the file prevents you from opening it. Perhaps you meant something else. If you show us the code you're using, we can probably point you in the right direction.

As far as "masking" goes, substr would seem to be an appropriate tool:

$ perl -E 'my $x = "1234567890123456"; say $x; substr $x, 6, 6, "*"x6; + say $x' 1234567890123456 123456******3456

— Ken

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2018-09-23 23:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (191 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!