#!/usr/bin/perl
# Note the perl DBI module needs to be installed, along with the DBI connector
# for your specific database--DBI--in this case.... 
# NOTE, for this program to work, you need to fill in the particulars of 
# your own database here, in the [] brackets

use DBI;

$dbh = DBI->connect('DBI:mysql:[NAME OF DATABASE]', '[LOG IN NAME]', '[LOG IN PASSWORD]')
			|| die "ERROR: $DBI::errstr";


$sth = $dbh->prepare('[SQL QUERY STATEMENT GOES HERE]');

$sth->execute();

while ( @row = $sth->fetchrow_array) {
	print "@row\n";
	print "$row[0]\n";
	print "$row[1]\n";
	print "$row[2]\n";
					}

$dbh->disconnect();
