in reply to Number of Elements in HoL

It looks like you're putting that array ref in list context when you want scalar context. Try this:
my $hostcount = scalar(@{$ClusterHostList{ $clusterID }});
Technically, I don't think you need that "scalar()", but it's good documentation of what you're doing.