{ my %cache; sub heavy_lifting { my $arg = shift; return defined $cache{ $arg } ? $cache{ $arg } : $cache{ $arg } = grunt($arg); }