http://qs321.pair.com?node_id=1054061


in reply to Re^2: Capturing regex from map
in thread Capturing regex from map

Some other variants:
map { /^online.*svc:(.*?):/; $1 // () } map { /^online.*svc:(.*?):/ and $1 or () } map { /^online.*svc:(.*?):/ ? $1 : () }
The latter two are easy to extend if there are multiple captures. (The middle one is my favourite.)