#!/usr/bin/perl use strict; my $uNamePass = "user/password"; my @dbName; #Uses username password and dbName to connect databsae # e.g. user/password@db1 foreach my $item(@dbName) { $dbConnect = &connect($uNamePass."@".$dbName); &getRows; } exit($exitStatus); #------------ sub readFile { my $fName = "c:\tnsentry.txt"; my $dbName; # open file if ( ! open (DAT, $fName) ) { ¨ } # read file by each line while() { chomp; # if line begins with # sign, proceed to next next if /^\#/; # Next not able to figure out how to read each line and store distinct # DB name in an array to use for login in $dbConnect # I think I need to sepearte SID with /SID/ and search for string till it reaches ')' }