>perl -wMstrict -le "my @test = ('0 xx', 'xx 0', '0'); ;; my @test_filtered = map { (/(\d+)[\d.]*/g)[-1] || '' } @test; printf qq{'$_' } for @test_filtered; " '' '' ''
Update: // vice || does the trick.
In reply to Re^2: Array Filter and Lookahead
by AnomalousMonk
in thread Array Filter and Lookahead
by daugh016
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |