*CORE::log = sub { # Your logging code here } #### do_some_operation( @args ) or log( "some_operation() failed with @args!" );