in reply to Re^2: Capturing regex from map
in thread Capturing regex from map
Some other variants:
The latter two are easy to extend if there are multiple captures. (The middle one is my favourite.)map { /^online.*svc:(.*?):/; $1 // () } map { /^online.*svc:(.*?):/ and $1 or () } map { /^online.*svc:(.*?):/ ? $1 : () }
In Section
Seekers of Perl Wisdom