#---------------------------------------------------- #This section will contain the searched for the DB tables in the SQL files #and return all lines that contain an instance of a DB table. #This will open the file that will contain the list of tables open(TABLES, '>tableUsed.txt') or die "The file tablesUsed.txt could not be writt en to\n"; #This will convert the files into lists to be searched @tableList=; @fileList=; @tableUsed=; #declarations $W=0; $Q=0; #This will search through the files and see if the tables exist in the file foreach $W (@tableList) { foreach $Q (@fileList) { #if (exists($Q{$W})) if($W==$Q) { #print TABLE "$W\n"; push(@tableUsed, $W); print USED @tableUsed; }#end of if else { print USED "no tables exist in the file\n"; } } }#end of foreach loop close(UPDATE); close(TABLES); close(USED);