Perl: END { }

Sometimes in coding I've found that you need to have code that runs on exit, regardless of why. In Python you can use atexit but in Perl it's as easy as defining an END code block:

    # Do some clean up code
    close OUTPUT_FILE;

Cool it looks like there is a BEGIN method as well!

Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
Logged IP:
To prevent spam please submit by clicking the kitten: