2003-05-27T13:45:53 Andrew Pimlott: > On Tue, May 27, 2003 at 05:27:00PM +0100, Simon Cozens wrote: > > I'd say it was undefined behaviour. > > Modification of a read-only value attempted?
_Attempted_? I'd say, _accomplished_:-).
I actually think this is kinda Fun With Perl.
Hmm, now to find Fun uses for this sorta thing.
Hmm. It is _not_ a working closure; it's a shared-memory
constructor, joy!
#!/usr/bin/perl -w
use strict;
sub genbla {
sub {
for my $i (reverse 0..5) {
$i++;
print $i;
}
print "\n";
}
}
genbla->();
genbla->();
genbla->();
-Bennett
pgp00000.pgp
Description: PGP signature
