… | |
… | |
276 | @exec = ($launcher, $match); |
276 | @exec = ($launcher, $match); |
277 | } else { |
277 | } else { |
278 | # It'd be nice to just access a list like ($&,$1,$2...), |
278 | # It'd be nice to just access a list like ($&,$1,$2...), |
279 | # but alas, m//g behaves differently in list context. |
279 | # but alas, m//g behaves differently in list context. |
280 | @exec = map { s/\$(\d+)|\$\{(\d+)\}/ |
280 | @exec = map { s/\$(\d+)|\$\{(\d+)\}/ |
281 | substr $text, $begin[$1 || $2], $end[$1 || $2] - $begin[$1 || $2]) |
281 | substr $text, $begin[$1 || $2], $end[$1 || $2] - $begin[$1 || $2] |
282 | /egx; $_ } split /\s+/, $launcher; |
282 | /egx; $_ } split /\s+/, $launcher; |
283 | } |
283 | } |
284 | |
284 | |
285 | push @matches, [ $begin[0], $match, @exec ]; |
285 | push @matches, [ $begin[0], $match, @exec ]; |
286 | } |
286 | } |