But I don't have my data in a hash
The hash is used as a clear and concise way to list both the data which you have (the keys) with the results which you want (the values) and to test that an operation on the former yields the latter. There is no need for you to use a hash in your implementation. See How to ask better questions using Test::More and sample data for a recent discussion on why using a test in a question is a good idea and why (to my mind) using a test in an answer is equally beneficial.
The fact that my example iterates over a list (keys %names) should help you to use a similar list in your own code as do the examples from pod and ExReg.