in reply to Assign multiple items into an array containing the range operator from a file
This seems quite similar to the recent thread loop iterator in a string, probably some of the answers there will be useful to you.
In Section
Seekers of Perl Wisdom