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

Re: '+' to +

by sh1tn (Priest)
on May 29, 2005 at 17:03 UTC ( [id://461539]=note: print w/replies, xml ) Need Help??


in reply to '+' to +

Maybe:
my $problem = qr{ (\d+ \s+ [\+|\-|\*|\/] \s+ \d+) }x; my $evaluation = '10 / 2'; { local $_ = $evaluation; s/$problem/$1/ee; print }
STDOUT: 5


Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 17:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found