Hi Greg,

2009/5/22 Greg Aiken <[email protected]>:
> the sub-routines then look to the value of $main::weve_found_answer to
> determine if it should stop recursively calling itself because the answer
> has already been found – or continue to recursively call itself again.
> [..]
> so I ask…  ‘is there a better way of allowing each sub routines
> instantiation, at any nested level of the recursive call, be able to know
> when the answer has been found?’
Why don't you just exit once the answer has been found?
  if($answer_found) { print "Answer: $answer"; exit 0; } else { recurse(); }

As Brian Raven said, a code sample would also be helpful, so we can
see if there's a good reason for you _not_ to just exit and leave at
this point.

cheers,
Gaurav
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to