|P is for Practical
Re^2: Making a variable in a sub retain its value between callsby tlm (Prior)
|on Apr 18, 2005 at 21:50 UTC
Update: In the days and weeks after the debate that followed this comment of mine, through reading and CB conversations I have convinced myself that INIT blocks are not "up to spec", so I'm avoiding them. See in particular TimToady's node in this thread.
In the TIMTOWTDI vein, I'm partial to INIT blocks myself:
I like using an extra internal INIT block only because it clearly sets the initialization code off from the rest.
Of course, if one doesn't like INIT or BEGIN blocks, one can always explicitly check in test that $memory has been initialized and remedy the situation if necessary, but that's ugly, IMO.
the lowliest monk