sub gethosts { foreach $class(@hostclass) { chomp (@hosts_per_hostclass = `/opt/systems/bin/expand-hostclass --hosts -r $class`) ; my @dd; push @dd, split "\n", $_ for @hosts_per_hostclass; print scalar(@dd) , "\n"; } }