Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: '+' to +

by ambrus (Abbot)
on May 30, 2005 at 20:54 UTC ( [id://461865]=note: print w/replies, xml ) Need Help??


in reply to Re: '+' to +
in thread '+' to +

The same idea, except that it's a bit faster, still using only core modules.

use Math::Complex; $big = 0*i; $Problem = "6 * 8"; $Problem =~ /^(\d+)\s(\S)\s(\d+)$/; ($Number1, $Operator, $Number2) = +($1, $2, $3); $Answer = ($big + $Number1)->${\("(" . $Operator)}($Number2); print $Answer, "\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-24 17:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found