Yeah, that looks like the the way they meant.
The tutorial I'm doing is good in some ways, but occasionally there seems to be too large a gap between what has been demonstrated and what I'm asked to do. So if I can't do it the exact way that was intended I'm happy to find another solution, I'm sure I'll come across all the different ways of going about things anyway the further I get in to Perl.