http://www.perlmonks.org?node_id=1062870


in reply to Re: splitting the scalar variables in an array
in thread splitting the scalar variables in an array

my @dd; push @dd, split "\n", $_ for @TotalHosts;

No need for push and for:

my @dd=map { split "\n" } @TotalHosts;

Alexander

--
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)