Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

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

by kcott (Archbishop)
on May 01, 2018 at 09:58 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1213882]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-19 22:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found