Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: extracting data from string

by moritz (Cardinal)
on Jul 16, 2012 at 10:59 UTC ( #982006=note: print w/ replies, xml ) Need Help??


in reply to extracting data from string

but a single statement has to do it

Why? You seem to optimize for a really silly thing. The code should be understandable and robust. See also: The path to mastery.

Anyway, you can do this:

for ("!defined(FLOAT_CODE)", "defined(FIXED_CODE)") { /^(!?)defined\((\w+)\)/ and print "$1$2\n"; }


Comment on Re: extracting data from string
Download Code

Log In?
Username:
Password:

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

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

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









    Results (131 votes), past polls