Hi Dick,

You can do the same sort of nested data in Perl and therefore in problems. The following should be something that would work.

@BX = ( [ 1, [2,4,5,8,11] ], [ 2, [2,3,4,5,8,11] ], [ 3, [3,4,8,11] ] );

$j = random( 0, scalar(@BX), 1 );

$b = $BX[$j]->[0];

$x0 = $BX[$j]->[1];

Now $x0 is a list reference. Thus if $j is 0, @$x0 is the list (2,4,5,8,11) and we can dereference elements of the list with the arrow operator: $x0->[3] is 5.

Does that help?

Gavin

## WeBWorK Problems

### Q: list of lists

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