A possible more elegant way:
use strict; my $text = 'f000124_90181234_dp'; my $sites = [ '018', '324' ]; if (grep {$text =~ /_9$_/} @$sites) { print "To be removed..\n"; }
In reply to Re: How to make sure no elements from @array are inside $scalar
by pme
in thread How to make sure no elements from @array are inside $scalar
by Steffen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |