This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
checkAUTHORS.pl --rank would loop infinitely on an empty results array.
authorNicholas Clark <nick@ccl4.org>
Fri, 13 Jan 2006 21:44:47 +0000 (21:44 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 13 Jan 2006 21:44:47 +0000 (21:44 +0000)
p4raw-id: //depot/perl@26838

Porting/checkAUTHORS.pl

index 03cb362..be58ea2 100644 (file)
@@ -221,6 +221,7 @@ sub display_ordered {
   }
 
   my $i = @sorted;
+  return unless $i;
   while (--$i) {
     next unless $sorted[$i];
     print wrap ("$i:\t", "\t", join (" ", sort @{$sorted[$i]}), "\n");