in reply to Re: How's your Perl?
in thread How's your Perl?
Though I'm almost certain that's what the OP had in mind, it relies on a bug rather than a documented feaure. For that reason I happen to like this solution to question #5 of the OP's quiz:
"If I had my life to live over again, I'd be a plumber." -- Albert Einstein
sub{my$x=\$x};
Updated version that creates only one $x:
sub { my $x; $x = \$x; }
The anonymous sub is created and immediately falls out of existance because it's not passed to a scalar variable. And yet $x never disappears because its reference count is always going to be 1; it refers to itself.
It probably doesn't qualify as a static, and is pretty much useless, but it meets the definition of static that the OP gave.
Dave
"If I had my life to live over again, I'd be a plumber." -- Albert Einstein
|
---|
Replies are listed 'Best First'. | |
---|---|
Re[3]: How's your Perl?
by xmath (Hermit) on Oct 27, 2003 at 06:36 UTC | |
by tachyon (Chancellor) on Oct 27, 2003 at 07:26 UTC | |
by Juerd (Abbot) on Oct 27, 2003 at 08:11 UTC | |
by tachyon (Chancellor) on Oct 27, 2003 at 08:29 UTC | |
by Juerd (Abbot) on Oct 27, 2003 at 08:33 UTC | |
by xmath (Hermit) on Oct 27, 2003 at 10:06 UTC | |
Re: Re: Re: How's your Perl?
by Anonymous Monk on Oct 27, 2003 at 04:27 UTC | |
Re: Re: Re: How's your Perl?
by Anonymous Monk on Oct 27, 2003 at 05:38 UTC | |
by davido (Cardinal) on Oct 27, 2003 at 06:26 UTC | |
by xmath (Hermit) on Oct 27, 2003 at 10:12 UTC |
In Section
Meditations