Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: split string using optimized code or perl one liner

by toolic (Bishop)
on Feb 22, 2017 at 13:48 UTC ( [id://1182525] : note . print w/replies, xml ) Need Help??


in reply to split string using optimized code or perl one liner

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