$x = wave(keys %actor); $y = wave(keys %thing); $item = wave($actor{$x}{owns}->{$y});