http://www.perlmonks.org?node_id=927421


in reply to Unusual (and pointless?) idiom in old code

Is this in a loop, eliminating values from the previous iteration? If not, you don't need to assign anything at all. If it IS in a loop, try moving the declaration into the loop, so that once again you don't need to initialize, because limited scope causes the variable to be created, new and empty, once each time around.

I have similar problems, with code written 12 years ago by interns borrowed from the mainframe department and not supervised or peer-reviewed.

As Occam said: Entia non sunt multiplicanda praeter necessitatem.