my $string = 'Hi There'; local *_ = \$string; s/\s+/ /g; print $string; __OUTPUT__ Hi There