in reply to Too Many Ways To Do It

unless(i_got_much_time()) { take_the_first_guess(); } else { unless(i_am_performance_sensitive()) { if(rand < 50 || i_am_in_a_strange_mood()) { @solutions = think_about_other_solutions(max => 3); pick_one_from @solutions; } else { take_first_guess(); } } else { # pathological case: much time and performance needed really_start_thinking_and_try_to_find_best(); } }
;-)

Obviously this is a very pragmatic approach, but that's how I usually do it in perl.

Regards... Stefan
you begin bashing the string with a +42 regexp of confusion