in reply to MySQL results inserted into Perl variable

The following should give you a reference to an array of hashref in $ref:

my $ref = $dbh->selectall_arrayref( "SELECT field1, field2 FROM location WHERE restriction = 'RESTRICTION NAME'", { Slice => {} } );
Each hashref should have 'field1' and 'field2' as keys. You can pass that around as needed and wind up with something like this:
for my $row_ref ( @{$ref} ) { # do something awesome with $row_ref->{field1} and $row_ref->{fiel +d2}. }
BTW, you left out use strict; and use warnings; only for the sake of brevity, right?

Update: edited SQL for better formatting

You must always remember that the primary goal is to drain the swamp even when you are hip-deep in alligators.