in reply to Array Filter and Lookahead
Here's another option:
my @test_filtered = map { (/(\d+)[\d.]*/g)[-1] // '' } @test;
Update: changed to // to handle 0s. Thanks again, AnomalousMonk.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Array Filter and Lookahead
by AnomalousMonk (Archbishop) on Nov 20, 2012 at 20:13 UTC | |
by Kenosis (Priest) on Nov 20, 2012 at 20:29 UTC | |
by AnomalousMonk (Archbishop) on Nov 20, 2012 at 21:18 UTC | |
by Kenosis (Priest) on Nov 20, 2012 at 21:31 UTC |
In Section
Seekers of Perl Wisdom