http://qs321.pair.com?node_id=107875


in reply to END in packages

The loader cares about the last statement executed, and that will be the main-line code. The creation of a sub, even a special one like END, doesn't cause the contents of that sub to be run--your 1 is not seen 'till it's called. END is not called when a module is loaded, but when it's terminated.

In a related thread, the idea of using return 1; at the end of the module was raised, as being clearer.