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

Re^2: splitting the scalar variables in an array

by afoken (Prior)
on Nov 16, 2013 at 09:13 UTC ( #1062870=note: print w/ replies, xml ) Need Help??


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". ;-)


Comment on Re^2: splitting the scalar variables in an array
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062870]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2015-07-28 09:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls