Thanks for both the replies. After making the change of \@vec to ~~@vec
it works fine!
Converting from perl to webwork
This forum has a limit to the number of forum postings you can make in a given time period - this is currently set at 5 posting(s) in 1 day