use strict; use warnings; my $string = "Kev.has.a.stupid.perl.question"; my @array = split /\./, $string; my $fixed = join('\.',@array); print $fixed;