use 5.014; my $string = "0:00 11/21/2012"; my $new = $string =~ s/ / /r; say $string; say $new;