Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Data::Types or grok_number

by Kenosis (Priest)
on Sep 25, 2012 at 17:50 UTC ( #995604=note: print w/ replies, xml ) Need Help??


in reply to Data::Types or grok_number

Here's another option using Regexp::Common:

use strict; use warnings; use Regexp::Common qw/ number /; print for grep /^$RE{num}{int}$/, <DATA>; __DATA__ 3.14 10 -42 42 .14159 12.34e-56 3.0 Hello, world.

Output:

10 -42 42


Comment on Re: Data::Types or grok_number
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995604]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (17)
As of 2015-03-03 15:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:









    Results (75 votes), past polls