five-bugs-a-day: use splice to trim the bug list

This commit is contained in:
Luis de Bethencourt 2012-05-25 09:17:17 +01:00
parent b259b5c476
commit 4ebe1c0b78

View file

@ -149,7 +149,7 @@ my @all_bugs = keys %BUGS;
my @bugs = shuffle (\@all_bugs);
# only want first NUM_BUGS bugs
$#bugs = $NUM_BUGS;
@bugs = splice (@bugs, 0, $NUM_BUGS);
print "\n";
print "$NUM_BUGS random bugs:\n";