Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 romping around the Monastery: (8)
As of 2015-04-21 05:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who makes your decisions?







    Results (389 votes), past polls