@results = grep { /$match/ } @data2;
To add a new value (or values) to an array, use push:
push @results, grep { /$match/ } @data2;
In reply to Re: Help understand why this grep does not work
by choroba
in thread Help understand why this grep does not work
by drmrgd
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |