Wouldn't this work? Not that I know off the top of my head, but I've
used similar structures in the past (not for heavy calculation work
mind you, mostly for lexical parsing loops...)
our $answer = recursive_function (initial parameter list);
sub recursive_function {
my $answer;
some
our $global_answer;
recursive_function (initial parameter list);
sub recursive_function {
some stuff to do;
do we have answer?
if yes {
$main::global_answer = ...
return;
else
recursive_function (refined parameter list);