use strict; use warnings; my $string = 'www.perlmonks.org.split.reduce.code.check'; my @array = reverse split /\./, $string; print "Reversed data ==> @array\n";