Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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"; }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://982006]
marioroy Updated Re^3: RFC: Compiling Gtk+ stack on windows with strawberry perl. Also tested Gtk2 installation on Strawberry Perl v5.22.3.1. Installing Tk and Tk::Zinc works fine on Perl v5.22.3.1.
[marioroy]: Hi karlgoethebier. Folks can comment feasibly if asking the review via a meditation (imho).
[marioroy]: karlgoethebier Ah, am not sure if tiny meditation or a cool use. ;-)

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2017-09-24 09:38 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (273 votes). Check out past polls.