The source of the error message is that you have put the close brace on the same line as END_TEXT, but END_TEXT must be on a line all by itself. The brace should be on the following line, as it is in the documentation. (It is in the documentation, but on the line following the END_TEXT.)
There is a second problem, which is my fault: the variable $panic should be $panicked and I listed it incorrectly in the documentation. I have corrected it in the CVS copy, so you should get that, but the on-line documentation won't be updated until tonight (it is updated nightly from the .pl files automatically).
Davide
WeBWorK Problems
problemPanic.pl
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