I would like to know how to use the

`swap_rows`

subroutine defined in `PGmorematrixmacros.pl`

What is wrong with the following code?

` DOCUMENT(); `

loadMacros(

"PGbasicmacros.pl",

"PGanswermacros.pl",

"PGmatrixmacros.pl",

"PGmorematrixmacros.pl",

);

TEXT(beginproblem());

$A = random_inv_matrix(3,3);

$B=swap_rows($A,1,2);

BEGIN_TEXT

\{ mbox(display_matrix($B)) \}

END_TEXT

ENDDOCUMENT();

I obtain the error:

`Can't use an undefined value as an ARRAY reference at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 1218.`

Thanks in advance.