$var = undef and undef $var behave differently in respect to memory deallocation.
The first never seems to free memory, while the second does instantly. BrowserUk's code uses about 136MB on my system, while the bellow never grows past 4MB on my system. (Win98/AS809)