sub apply (&@) { my $func = shift; $_ = $func->($_) foreach @_; } apply {lc} $var; apply {uc} $var1, $var2; apply {abs} @values; # etc.