# make a block and locally scope a var { local $/; # $/ is now undef so glob a file in } # now $/ is back to normal as the changes are scoped to the block above