$^H{SORT} |= $sort::stable_bit;
} else {
require Carp;
- Carp::croak("sort: unknown subpragma '@_'");
+ Carp::croak("sort: unknown subpragma '$_'");
}
}
}
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
choice of algorithm with this pragma, but this feels heavy-handed,
so the subpragmas beginning with a C<_> may not persist beyond Perl 5.8.
+=head1 CAVEATS
+
+This pragma is not lexically scoped : its effect is global to the program
+it appears in. This may change in future versions.
+
=cut