$var2 = s/123/456/g (tr/a-z/A-Z/ ($var)); #### sub apply (&$) { local $_ = $_[1]; $_[0]->(); $_; } $var2 = apply {s/123/456/g; tr/a-z/A-Z/} $var;