{ # localize special variables and assign different values local $" = '|'; # do something with the modified special variables print "@fields\n"; # when the lexical scope ends, perl automatically # restores the special variables to their previous value } my $text = do { local $/; }