in reply to Re: Re: How's your Perl?
in thread How's your Perl?
A static variable in a subroutine context would be created only once and
hold its value between invocations. You've created a circular reference in
an uninvokable routine. Even if it weren't optimized away, of which I am
uncertain, it bears no resemblance to a static variable.
Re: Re: Re: Re: How's your Perl?
by davido (Cardinal) on Oct 27, 2003 at 06:26 UTC
|
You are correct, given the conventional definition of a static variable. But the Original Poster provided us with a test of expert Perl prowess, and went so far as to give us his expert definition of static:
"static variable" means a variable with infinite lifetime...
My solution meets his spec. In a rediculous way, of course... but then again it's a rediculous quiz.
Dave
"If I had my life to live over again, I'd be a plumber." -- Albert Einstein
| [reply] |
|
But the Original Poster provided us with a test of expert Perl prowess, and went so far as to give us his expert definition of static
ok ok I messed up; because I've had questions about what a "static variable" is (not all perl programmers are C programmers) so I added a quick clarification and got it wrong.. nobody's perfect
no need to get sarcastic here
My solution meets his spec. In a rediculous way, of course... but then again it's a rediculous quiz.
true on both points :-)
| [reply] |