$time_zone_func = sub {gmtime()}; # then print $time_zone_func->(); # or print &$time_zone_func;