C always cleaned up after termination using, I figured, a signal from UNIX on process termination. Silly me to think that behavior would be emulated. Anyhow, the END block works just fine. Thanks.
Comment on Re^2: handler for normal termination? (END)
C doesn't clean up much* by it self and when you need to do your own clean up handling you use end handers, which are not exactly signal handlers, just like perl. See the atexit() function in stdlib.
* besides closing the file handles and freeing the memory, which are done by the kernel regardless of language.