I'm working on a project to test our ssh ability to connect, but I have literally hundreds of different profiles. I'm very new to perl, but I wanted to test this via a script (and get my feet wet). Basically for every one of my clusters I have a user profile, if the cluster is say c30, the I may have have something like 4 nodes in the c30 cluster. For example c30 may have a name like c30g1 c30g2, etc.

This doesn't run, but in the past I've got this to work, it only grabs the first element in the array, and not the second one. Also in some cases like in the above example, it will say that nodecount is not numeric. I'm not sure how arrays work here, but is there anyway where I can pass an entire array into the commandline args?

If your list/cluster is more than the few nodes that you mentioned, then passing each of them as args is fine. However if the cluster contains more than few nodes, then it would be best to create a config file of the clusters and pass the "cluster name" as the arg and use that to load the node list from the config file.