> Why are there still no empty elements in the returned array 
> for the items that didn't match the pattern? @must == 2
> 
> I am just befuddled but this "paradox"
> > 
> > Thus, map { m!(.*)/\*! } LIST will return $1 or () for each
> > element of the
> > LIST.

When you have

LIST2 = map { m!^(.*)/\*$! } LIST1

It's shorthand for a loop like:

foreach my $el (@LIST1) {
  if($el =~ m!^(.*?)/\*$!) {
    push @LIST2,$1
  } else {
    push @LIST2,()
  }
}

So when the regular expression doesn't match, it pushes an empty list,
which adds nothing to the array.

 -dave



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to