X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsort.pm;h=8140a7d2905e7388853a51d72d6414b9b831fb44;hb=e7ec2331900cd22a50f48dd01fa18bd3026f6253;hp=c9ef3faaf98509ebbe16dbb1b8d1d128efd6cf31;hpb=c53fc8a620e539470713c5fc9ecf3b649176ff4a;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/sort.pm b/lib/sort.pm index c9ef3fa..8140a7d 100644 --- a/lib/sort.pm +++ b/lib/sort.pm @@ -31,7 +31,7 @@ sub import { $^H{SORT} |= $sort::stable_bit; } else { require Carp; - Carp::croak("sort: unknown subpragma '@_'"); + Carp::croak("sort: unknown subpragma '$_'"); } } } @@ -77,7 +77,7 @@ quicksort defends against quadratic behaviour by shuffling large arrays before sorting. A stable sort means that for records that compare equal, the original -input ordering is preserved. Perl's mergesort is stable, quicksort is not. +input ordering is preserved. Mergesort is stable, quicksort is not. Stability will matter only if elements that compare equal can be distinguished in some other way. That means that simple numerical and lexical sorts do not profit from stability, since equal elements