in reply to Re^2: increasing value every time sub routine called
in thread increasing value every time sub routine called

Well in perl land, a single (named) subroutine with a (lexical) external variable is still classed as a closure.

Dave.

  • Comment on Re^3: increasing value every time sub routine called

Replies are listed 'Best First'.
Re^4: increasing value every time sub routine called
by JavaFan (Canon) on Dec 09, 2011 at 21:50 UTC
    Note that my solution does not use any lexical variables.