... { local $\; print "\x{FEFF}"; } ... #### ... code as it is now ... # later changes: ... { local $\ = "\n"; ... code using changed $\ ... } ...