Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The CPAN is Perl's module repository and is where users should turn first for code that implements solutions to already-solved problems.
From the Perl documentation:
Perl is a language optimized for scanning arbitrary text files, extracting information from those text files, and printing reports based on that information. It's also a good language for many system management tasks. The language is intended to be practical (easy to use, efficient, complete) rather than beautiful (tiny, elegant, minimal).
Free Perl Programming Books
If you are just starting out with Perl some of the references below may be worth looking in to.