Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: how to get outputby Util (Priest) |
on Feb 18, 2014 at 05:28 UTC ( [id://1075263]=note: print w/replies, xml ) | Need Help?? |
Change: Adding the first set of parens causes $out to be treated as a one-element list. Without those parens, you have scalar context instead of list context; regex matches in scalar context return "truth" of the match instead of anything captured in the match. That Truth is represented as the "1" you are seeing. Adding the second set of parens declares what data should be captured when the regex is evaluated during the match. Server Error (Error ID 9014171a2048916)An error has occurred. The site administrators have been notified of the problem and will likely soon fix it. We thank you, for you're patients.
In Section
Seekers of Perl Wisdom
|
|