in reply to selecting within elements of arrays
And if you wanted to do this match on an array of strings you could do something like thisif($array[1] =~ m{ /:swiss \| \w+ \| \w+ }x) { ... }
my $match_re = qr{ ^ /:swiss \| \w+ \| \w+ }x; foreach my $line (@array_of_strings) { if($line =~ /$match_re/) { ... } }
_________
broquaint
|
|---|