CGI.pm is definitely the way to go for web/cgi programming; for an explanation of why see
. But Perl is a rich language and is useful for a lot more than web-automation and cgi programming involves a lot of little (often annoying) details that may hamper your ability to learn the fundamentals of the language. I'd suggest picking up a good general Perl book, such as
if you are really interested in learning Perl. Even if all you want to do is web programming, a general understanding of the language will serve you well.