in reply to Re: how can i hold temporary values in a recursive function
in thread how can i hold temporary values in a recursive function
sub rec_helper { my %state; local *recursive = sub { my( $arg ) = shift; ... if( ( $arg = $state{ $arg ) ) == ... ) { return recursive( $arg ); } else { return 0; } }; }
|
|---|