Beefy Boxes and Bandwidth Generously Provided by pair Networks BBQ
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: splitting the scalar variables in an array

by jwkrahn (Monsignor)
on Nov 16, 2013 at 10:36 UTC ( #1062874=note: print w/ replies, xml ) Need Help??


in reply to splitting the scalar variables in an array

$hosts_per_hostclass = `/opt/systems/bin/expand-hostclass --hosts -r $ +class` ; push (@TotalHosts,$hosts_per_hostclass);

Back-quotes in list context return a list so you could do this:

chomp( @hosts_per_hostclass = `/opt/systems/bin/expand-hostclass --hos +ts -r $class` ); push @TotalHosts, @hosts_per_hostclass;


Comment on Re: 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://1062874]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2014-04-17 06:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (440 votes), past polls