You use the CGI module:
http://perldoc.perl.org/CGI.html
But if you just started learning perl yesterday this is not going to be too easy to understand. You need to get the basics down first: data types, string and math operators, loops, file IO, some regular expression knowledge, perls built in functions, then go on to modules, like the CGI module.