my $str = "14/01/52"; $str =~ s/\//-/g; # replace / with - print "$str\n";