sub logit { # öffne, schreibe und schließe Logdatei } sub other_function { # code &logit($return_value); return($return_value); } $var = &other_function($foo,$bar);