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

The problem is to identify the number in the file because I cannot open the file because sometimes files are too large.

The problem is not opening the file. If opening fails, it is because you are not allowed to do that (permissions), file doesn't exist or isn't a file.

Most likely, what fails is reading the whole file into memory.

Show some code! so we can see where it probably fails.

Matching 123456******3456 in perl is m/123456\d{6}3456/. See perlre.

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'