use Data::Dumper and check the values of '@db_rows' and '@live_rows' arrays before each while loop. 'undef' the arrays before pushing 'RouterB' results to it.
Comment on Re: Problem with two mysql queries in a loop
^^
I got the point. I just assigned the @db_rows and @live_rows an empty array. making it undef makes the array undefined, so i cant use it, instead the assigning empty array worked well.\
Thanks lamp for the help :)