How can I save the memories from the Perl match operator in variables?

Posted by joachim on Stack Overflow See other posts from Stack Overflow or by joachim
Published on 2009-11-02T13:07:23Z Indexed on 2010/03/26 19:23 UTC
Read the original article Hit count: 242

Filed under:

If I have a match operator, how do I save the parts of the strings captured in the parentheses in variables instead of using $1, $2, and so on?

... = m/stuff (.*) stuff/;

What goes on the left?

© Stack Overflow or respective owner

Related posts about perl