The CGI
perl module is a way of interfacing with a webserver. It does the job it was always intended to, but it's been superseded by an assortment of frameworks for web development.
It has been removed from the perl core:
The rational for this decision is that CGI.pm is no longer considered good practice for developing web applications, including quick prototyping and small web scripts. There are far better, cleaner, quicker, easier, safer, more scalable, more extensible, more modern alternatives available at this point in time. These will be documented with
CGI::Alternatives
However, there's a bit of a learning curve for the assorted frameworks, and personally I find them geared up to 'proper wesbites' - not the 'script with a web interface' type things I tend to knock together. So I'd suggest reading though those alternatives, and if you're trying to do something clever - use one of them.
And if you're not, you probably didn't really need CGI
in the first place.