use strict; use warnings; use Data::Dumper; my @array1 = qw(234 453 111 239); my @array2 = qw(v204_txt v234_txt v450_txt v453_txt); my @array3 = grep {my $val=$_; grep {$val=~/$_/} @array1} @array2; print Dumper(\@array3);
In reply to Re: Array compare using elements as the pattern match.
by BillKSmith
in thread Array compare using elements as the pattern match.
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |