Posting this because it was way simpler than I thought, and I don’t need to write any perl!
You can just run one of the commands that is included with the vSphere Command-Line Interface (vCLI) and grep out the hosts to your heart’s content.
The command is :
/usr/bin/vicfg-hostops --config [config file] -c [cluster name] -d [datacenter name - optional] -o info
Gotta love a quick win on a Monday morning.