in reply to checking the matches

Efficently?
Not sure ;)

my %h = map{ reverse /(\d+).*#(.+)/ } grep "@array1", @array2; print Dumper \%h;
Output: $VAR1 = { 'def' => '890', 'abc' => '15', 'ghi' => '78' };

hth,
PooLpi

'Ebry haffa hoe hab im tik a bush'. Jamaican proverb