Hi all,
I'm wondering what is the best way to performance optimize a conditional
in Perl.
In my particular instance I have:
if (simple_condition and complex_condition) {
do_foo();
};
simple_condition is just a Boolean.
complex_condition is a large regex.
Is the above syntax optimal, or would I be better doing:
if (simple_condition) {
if (complex_condition) {
do_foo();
};
};
There's also the variation of:
if (simple_condition) {
do foo() if complex_condition;
};
I don't see how the above is different from the previous example but
thought I'd mention it just in case.
Steve
--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook <>