in reply to Re: Capturing regex from map
in thread Capturing regex from map
> try my @online_services = map { /^online.*svc:(.*?):/; $1 } `svcs`;
not equivalent:
DB<217> map { /(1\d*)/;$1 } 5..15 => (undef, undef, undef, undef, undef, 10, 11, 12, 13, 14, 15) DB<218> map { /(1\d*)/ } 5..15 => (10, 11, 12, 13, 14, 15)
Cheers Rolf
( addicted to the Perl Programming Language)
update
I think you meant:
DB<225> map { @matches=/(1\d*)/;@matches} 5..15 => (10, 11, 12, 13, 14, 15)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Capturing regex from map
by thezip (Vicar) on Sep 13, 2013 at 19:37 UTC | |
|
In Section
Seekers of Perl Wisdom