There's more than one way to do things | |
PerlMonks |
Re: Howto print multiple matches in a lineby ikegami (Patriarch) |
on Nov 11, 2008 at 03:39 UTC ( [id://722775]=note: print w/replies, xml ) | Need Help?? |
Replace if (/.../) with while (/.../g) to get all matches. Use parens around what you want to capture. Use $1 to get what's in the parens, not $_. In this, case you can write it concisely as
In Section
Seekers of Perl Wisdom
|
|