I have a .txt file with many emails including headers. I’m just wondering how I would use perl to find out how many occurrences of the same email address are found in this text file?
Would it involve regular expressions?
I have a .txt file with many emails including headers. I’m just wondering how
Share
How about this script:
Save it to a file such as
email.pland make sure it executablechmod +x email.pl../email.pl file.txtIt will print the total number of email addresses found and count per email address.