use strict; use warnings; { local $,="."; #so you get the . 's print ".102.111.111 - ",102,111,111; my $num=102; print ".$num.111.111 - ",102,111,111; }