There's more than one way to do things | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You need to have the expression evaluated in "list context" to get it to return what you are interested in, and you need capturing parentheses inside the pattern to show what you want to collect (in this case, I think it is your entire pattern).
i.e. (Note the parentheses around $thisresult and in the pattern). If the match fails, $thisresult would be set to undef. See "perldoc perlop" the (section on "m") and "perldoc perlre" for more details --JAS In reply to Re: storing string matched by regular expression
by jsegal
|
|