perl -anF"/\./" -E "chomp@F;say join q{.},reverse@F" zones.txt 10.100.1 10.100.2 10.100.3