in reply to selecting within elements of arrays

The problem is that you're not escaping the meta-character pipe(|) which alternates sequences in regex (see. perlre for more info on regexes). Also you're using the string comparision operator and not the regex matching operator =~ (see. perlop for more info on operators in perl) to match on $array[1]. To get your example to work you could do something like this
if($array[1] =~ m{ /:swiss \| \w+ \| \w+ }x) { ... }
And if you wanted to do this match on an array of strings you could do something like this
my $match_re = qr{ ^ /:swiss \| \w+ \| \w+ }x; foreach my $line (@array_of_strings) { if($line =~ /$match_re/) { ... } }

HTH

_________
broquaint