in reply to How do I use CGI.pm?

CGI.pm isn't really a standalone tool; it's a collection of stuff you can use to make CGI programming in Perl quite a bit easier. In general, Perl modules, which by convention end in .pm, allow you to load functions that you can then call from your own script. (Modules are also the mechanism typically used for creating classes if you're doing object-oriented programming, which you may or may not care about at this point.) If you put a line like this in your script:
use CGI;
Perl will look for a module called CGI.pm and run its contents through the interpreter before continuing. If you installed the module in a fairly standard location, Perl will probably find it without any further effort; if not, there are a few ways to control the directories that Perl looks in. One easy way is to add this earlier in your program:
use lib '/path/to/modules';

To answer the latter part of your question #1: No, you don't need to cut and paste at all. The use CGI line does the importing for you. But some modules don't export stuff by default, and you may need to specify exactly what you want when you use the module. Usually you can get the details from the module's documentation:
perldoc CGI

Debugging CGI scripts can be kind of tricky, so I'd also suggest getting your hands on the CGI::Carp module and adding this line to your scripts as well:
use CGI::Carp qw(fatalsToBrowser);
This will cause many run-time errors to send error messages to your browser rather than leaving you with an uninformative 500 Internal Server Error page and forcing you to search through the server log for details.

To help you get started, here's a sort of skeletal CGI script that you can fill in with actual logic:

#!/usr/bin/perl -w -T # Change the above line to the location of your Perl executable use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); my $query = new CGI; print $query->header(); print "Hello world!"; exit;

If you save this in Apache's /cgi-bin/ directory (or whatever you've configured to hold your executable scripts) as hello.pl, you should then be able to use your Web browser to visit http://your.server.address/cgi-bin/hello.pl and see "Hello world" appear in your browser.

Also, you asked about cgi-lib. I haven't used it personally, but it's my understanding that cgi-lib is basically an archiac way to get much of the functionality that's available in CGI.pm.

For general information about modules, try:
perldoc -q module
at your command prompt.

Best of luck.