in reply to DBI question

The code $ENV{'DBISERVER'} retrieves the DBISERVER environment variable, if the '-server' parameter is not specified by the caller. You could override the default server string when you create the object -
my $obj = CLASSNAME->new( -server => "mysql:server=xxxx;database=xxxx", -user => "xxxx", -pass => "xxxx" );

Where CLASSNAME is the name of your class module. I have written a demo below on using mysql via DBI:
#!/usr/bin/perl -w use strict; use DBI; use DBD::mysql; my $dbh = DBI->connect("dbi:mysql:server=somedomain.com;database=main_ +DB", "USER","PASSWD") or die "Failed to connect to the database!"; my $sth = $dbh->prepare( qq{ SQL } ); $sth->execute(); my @column_headings = @{$sth->{NAME}}; while (my @row = $sth->fetchrow()) { # Data elements $row[0] ... $row[$#row-1] ... } $sth->finish; $dbh->disconnect;