Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^2: Array Filter and Lookahead

by AnomalousMonk (Canon)
on Nov 20, 2012 at 20:00 UTC ( #1004784=note: print w/replies, xml ) Need Help??


in reply to Re: Array Filter and Lookahead
in thread Array Filter and Lookahead

>perl -wMstrict -le "my @lines = ('xx', '0 xx', '1 xx 3.2'); ;; 'Zonk' =~ m{ (\w+) }xms; ;; my @filtered = map { /.*(?<!\d)(\d+)/; $1 // '' } @lines; printf qq{'$_' } for @filtered; " 'Zonk' '0' '2'

Replies are listed 'Best First'.
Re^3: Array Filter and Lookahead
by moritz (Cardinal) on Nov 21, 2012 at 06:38 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1004784]
help
Chatterbox?
[Your Mother]: :P
[Lady_Aleena]: Your Mother, it is a good thing I am no on Windows.
[Lady_Aleena]: s/no/not/;
[Lady_Aleena]: My blasted web host will not put perl 5.22 in /usr/bin/perl, it is in /usr/local/cpanel/ 3rdparty/bin/perl
Lady_Aleena has been banging her head against this wall for years now with no success on breaking the wall.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2017-04-28 06:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (519 votes). Check out past polls.