Beefy Boxes and Bandwidth Generously Provided by pair Networks Ovid
"be consistent"
 
PerlMonks  

Re: using re 'eval' for varibable math

by tall_man (Parson)
on Apr 19, 2005 at 16:53 UTC ( [id://449426]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to using re 'eval' for varibable math

The Math::Pari module can evaluate mathematical expressions with a more restricted syntax than perl's -- but watch out for "system()". Here's an example.
use strict; use Math::Pari qw(PARI); my $question="67.35 >= 50 && 67.35 < 80"; # Pari doesn't like white space in expressions. $question =~ s/\s+//g; my $out = PARI $question; print $out,"\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://449426]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.