http://qs321.pair.com?node_id=1182522

madtoperl has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I am trying to reverse a string based on dot symbol and print the result. Below code is working fine. Do we have more efficient way of reducing the lines of code. Probably an one liner, please share your thoughts/a better version of code..
#!/usr/bin/perl use strict; use warnings; my $string = 'www.perlmonks.org.split.reduce.code.check'; my @array = (); @array = split /\./, $string; @array = reverse @array; print "Reversed data ==> @array\n";
Regards
madtoperl