http://qs321.pair.com?node_id=687918


in reply to checking the matches

Ikegami already provided a very compact solution using a hash. A more explicit (looped) variant would read like:

... for my $element (@array2) { my ($num, $txt) = split /#/, $element; # extract parts print "$txt = $num\n" if grep $num eq $_, @array1 # use text compa +rison and print txt part } ...

Regards

mwa