Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Re: Re: How's your Perl?

by Anonymous Monk
on Oct 27, 2003 at 05:38 UTC ( [id://302333]=note: print w/replies, xml ) Need Help??


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.

Replies are listed 'Best First'.
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
      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   :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://302333]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2024-03-28 09:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found