I'd start by reading the Camel book; even if you only read the first 30 pages or so, you'll have an empowering read that will allow you to start with your first scripts - and it might be enough for the moment if all you want to do is to process a simple text file or so. Or the internet is full of tutorials to learn Perl, see
Where and how to start learning Perl or
The basics on this site.
I'd be more precise if I had understood what you were trying to do with that files, but frankly from what you write I don't understand much...