title: How to read a MySQL database in Perl
body: <p>I am a beginner in Perl. I now have an SQL statement that is working correctly, but I want to use Perl to execute the SQL and output the result to a file. Could any expert provide a very basic template (starting from connecting to the database)?</p>