diff --git a/macros/ui/PGchoicemacros.pl b/macros/ui/PGchoicemacros.pl index 3f563bf8b4..6e330f40c0 100644 --- a/macros/ui/PGchoicemacros.pl +++ b/macros/ui/PGchoicemacros.pl @@ -793,7 +793,9 @@ sub invert { sub NchooseK { my ($n, $k) = @_; - return random_subset($k, 0 .. $n - 1); + # force list context + my @return = random_subset($k, 0 .. $n - 1); + return @return; } =item [DEPRECATED] shuffle() @@ -808,7 +810,9 @@ sub NchooseK { sub shuffle { my ($i) = @_; - return random_subset($i, 0 .. $i - 1); + # force list context + my @return = random_subset($i, 0 .. $i - 1); + return @return; } =item [DEPRECATED] match_questions_list()