in reply to an obfuscated closure

You don't see closures enough? Well, here's a closure for you. A closure with one variable from an outside scope: itself. (You need to allow code to be at least 77 columns wide to benefit optimally from the formatting)
$_ = "\nrekcaH lreP rehtona tsuJ"; my $chop; $chop = sub {print chop; +$chop}; $chop -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> ( +) -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> () -> ( +) -> ()

-- Abigail

Replies are listed 'Best First'.
Re: an obfuscated closure
by Maestro_007 (Hermit) on Jun 20, 2001 at 20:00 UTC
    A response from Abigail! I've been following your japh's for months! This was my first attempt at a japh, based on the very one you've quoted, along with a few others. Sure, I have seen closures in japh's, just not as often as other things. I guess I just really like closures...