five-bugs-a-day: use splice to trim the bug list
authorLuis de Bethencourt <luis@debethencourt.com>
Fri, 25 May 2012 08:17:17 +0000 (09:17 +0100)
committerLuis de Bethencourt <luis@debethencourt.com>
Fri, 25 May 2012 08:17:17 +0000 (09:17 +0100)
scripts/five-bugs-a-day.pl

index f722c39..c41cac4 100755 (executable)
@@ -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";