sub f { ... log('some information'); # but should be called only the first time. ... }