Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1062874]
help
Chatterbox?
[rpeguvan]: Hello

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2017-07-22 02:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (336 votes). Check out past polls.