Choosing the extension of your CGI scripts depends on your web server configuration. Without knowing more about that, it's difficult to assist you.
Most issues are tangentially related to Perl (but lots of people here do have experience with these sorts of things). The first resource I ever used is this FAQ (don't let the name throw you).
You will probably want to start your script with:
I have not read your book. If it does not explain strict and CGI
.pm, it is probably incomplete and may lead you astray. We can provide you with links to more complete information if this is the case.