in reply to Re: Initialization of "local static" (style question)
in thread Initialization of "local static" (style question)
use my in a block enclosing both
I had thought that my function would not be visible outside the block then, but of course, functions are always global. Nice idea!
I will remember it for use in a later project, though, because in my current one, the automatic documentation system requires that the documentation of a function appears immediately before the line starting with 'sub', which means that I would have to move the declaration of $myval in front of the function docs.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Initialization of "local static" (style question)
by massa (Hermit) on Feb 03, 2009 at 12:13 UTC |