Hi everyone,

I'm working with some customizable data from a config file, and can't
for the life of me figure out how to test conditionals from an
external source.
Does anyone have an idea how to accomplish something like:

    my $statement = "1 < 10 and 2 > 10";  # obviously false
    my $result = ($statement) ? 1 : 0;        # conditional test

Now, $result will always be true(1), because the conditional is
really, in effect, just validating that $statement is a defined
scalar, not testing the statement.
But, how can I perform an actual conditional statement on this?
What I really want is:

    (1 < 10 and 2 > 10) ? 1 : 0;


Thanks in advance!


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to