in reply to Help understand why this grep does not work

You are overwriting @results:
@results = grep { /$match/ } @data2;

To add a new value (or values) to an array, use push:

push @results, grep { /$match/ } @data2;
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ