If you use param
in a list context with no arguments, it will return "the parameter names as a list" (according to this node
@list = $q->param();
This node is a part of the standard distribution of Perl. Also read it by typing perldoc CGI at the prompt.
There are literally hundreds of documents within a very close reach of this web site that can answer questions like that. I recommend to anyone who is new to Perl that they first familiarize themself with these documents. It may seem daunding at first, but once you get the hang of it, it's much more rewarding to find the answers on your own.