in reply to while (my @row = $sth->fetchrow_array)

Just some hints:
1/ check if RaiseError or PrintError attributes are set when db connection established - if no, your dbh related commands could quietly fail
2/ check if the query really returns some rows - run this query on some sql-console directly.
3/ This cannot solve your problem, but it it better strategy, imho: Use '?' in queries and bind parameters. I think that
'..._area LIKE ?;'
is more readable and avoids potentiality of SQL-injection

Replies are listed 'Best First'.