$cached_value{ is_64bit_machine() } ||= somelongfunction() #### sub global_sum { state $sum = 0; $sum += $_[0]; $sum; }