in reply to Re: Explaining =~ and .= operators
in thread Explaining =~ and .= operators

=~ can also be used in list context to obtain the list of captures: $1, $2, etc.

--

Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)

Replies are listed 'Best First'.
Re^3: Explaining =~ and .= operators
by revdiablo (Prior) on Apr 04, 2006 at 16:02 UTC

    Not to be overly nitpicky, but that behavior is from the m// operator, not =~. I think this distinction is important to keep in mind, because =~ can be used with m//, s/// and tr///, which all have different behaviour.