my $lowIndex = BinSearch ($lowerlimit, sub {$_[0] <=> $_[1]}, $matches{$element}{$sitekey}) + 0.5; my $highIndex = BinSearch ($upperlimit, sub {$_[0] <=> $_[1]}, $matches{$element}{$sitekey}); my @arrayA = @{$matches{$element}{$sitekey}}[$lowIndex..$highIndex];