sub row_sql(){ my $select = $_[0]; my @row2,$dbh2,$sth2; if ($select eq ""){print "Empty Select."; exit;} $dbh2=DBI->connect($connectionInfo,$user,$passwd) || print "DBI Connection Failed!($DBI::errstr)"; $sth2=$dbh2->prepare($select); if (!($sth2->execute())) { } @row2=$sth2->fetchrow_array(); $sth2->finish; $dbh2->disconnect(); return (@row2); }