my $pattern = join '|', map quotemeta, @dates; my $re = qr/^logfile\..*\.($pattern)$/; /$re/ && print "matched: $_\n" for @logfiles;
Dave.
In reply to Re: create search string from array elements
by dave_the_m
in thread create search string from array elements
by ministry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |