Don't know what sort of leak you are talking about. When I tried to run it, it just waits for me to hit the return key.
perl -h explains that the -n switch assume while (<>) { ... } loop around program, so it is waiting for input from STDIN.
So I kept hitting <ENTER>, and watched the memory usage of perl on another terminal. The memory usage seemed quite stable at 4224k. Note that I did not have the close(DATA) line in my test script.