#!c:\perl\bin\perl.exe use strict; use warnings; use DBI; my $index; my $additional; #Create the strings first my $db = DBI->connect('dbi:mysql:sequence:localhost', 'db', 'pass'); my $sth = $db->prepare('SELECT * FROM milton'); $sth->execute(); my $indexstring = $sth->fetchrow_array; $sth = $db->prepare('SELECT * FROM milton1'); $sth->execute(); my $additionaltext = $sth->fetchrow_array; print "$indexstring\n"; print "$additionaltext\n"; if ($indexstring eq $additionaltext) { print "lines match"; } else { print "lines do not match"; #$index = split //, $indexstring; #$additional = split //, $additionaltext; } $sth->finish; $db->disconnect();