True, and in fact if you undef @array the effect is identical. See my node, above.
| [reply] [d/l] |
True, and in fact if you undef @array the effect is identical.
Try using Devel::Peek. undef @array sets MAX to -1, @array = () does not. Or use Benchmark and find out that undef @array is about twice as fast. The effect is the same, but internally, there's something entirely different going on.
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
| [reply] |
Granted. But besides the speed issue, the result is effectively the same.
In the case of undef @array, @array does not actually get undefined (i.e., it still exists), just emptied, however more efficiently than with @array = ().
| [reply] [d/l] [select] |