in reply to arrays and loop through array

Please note that the replacement part of a s/this/that/ is not a regular expression so the dots do not need to be escaped.

knoppix@Microknoppix:/media/sda1/perl/Monks$ perl -E ' > $str = q{6 - 10, 14 - 17, 19}; > $str =~ s{-}{..}g; > say $str;' 6 .. 10, 14 .. 17, 19 knoppix@Microknoppix:/media/sda1/perl/Monks$

I hope this is helpful.

Cheers,

JohnGG