A typical case is a Perl script getting information from a database using SQL queries, and sending output to a web server, thus generating markup language such as HTML or XML. There are several ways to avoid cluttering your script with many types of code at once.