Thanks for both the replies. After making the change of \@vec to ~~@vec
it works fine!
WeBWorK Problems
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 10 posting(s) in 1 day