CGI is not a programming language. It is a standard programming interface which gives a web page the capability to run/access other resources on the server(s) which visitors wouldn’t have direct access to.
Perl is a scripting language. It is often misconceived to be the same as CGI, as Perl was the popular language at the time when CGI gained momentum in the web world.
CGI can refer to a “scripting language” which gets interpreted when calls to a page from the webserver is being made. It can be referred as a “program“, when it gets executed on the webserver to have access to resources with hard coded paths other programs when a call from a web page happens.
In short, all Web applications built using ASP/PHP/Python/Perl speaks through the channel – CGI.