I've never had to assign undef to a variable. Don't you use
my? Worry about writing clear code first. *If* it runs too slow, then worry about optimisation. Start from the other end though. Don't start messing with every tiny thing. Use a
profiler to see which what would have a big effect.