Without knowing your exact use-case, I'll point out that another alternative on Perl 5.10+ could be to use state variables instead of my variables: use 5.010; sub leak { state $foo = sub { &$bar }; state $bar = sub { "$foo" }; return; } This only creates a single instance of $foo and $bar and thus doesn't leak -- which may not be what you're looking for if you really want to generate (and return) circular closures that change behavior with every invocation. -- DavidThread Previous | Thread Next