Sure, you're welcome!
If you have never programmed in Perl, then it might take some time to become comfortable with the language. But if you're going to do complex file processing, then learning a scripting language (any language: awk, Perl, Python, Ruby etc.) might be a good investment of your time.
A good way to learn Perl would be to start small and understand one concept at a time. For example,
- the shebang line (first line)
- the purpose of "use strict"
- hashes, arrays, scalars,
- how files are read, how they are written
- regular expression syntax
- functions like "lc", "int"
- operators like "defined" etc.
The Perl documentation is the best place to get information about these individual bits:
(1) perldoc.perl.org
Simon Cozen's online book is good for understanding programming in Perl (only the first 6 chapters should be enough):
(2)
https://www.perl.org/books/beginning-perl/
The books by O'Reilly are well regarded:
(3) Learning Perl
(4) Intermediate Perl
And for the advanced Perl programmer:
(5) Programming Perl
Cookbooks are very interesting as well - they provide just enough information to get the job done. An online Perl cookbook is:
(6)
PLEAC-Perl
And the published book is:
(7) Perl Cookbook, 2nd edition
This website has a list of Perl tutorials on the Internet and also mentions which ones are good and which ones are bad:
(8)
Perl Tutorial Hub
However, besides reading about Perl, you'll also need to actually write programs to understand it.
=================
Having said that, there should be other forum members here who could post awk or plain Bash scripts for your problem, so keep an eye on this space.