From: Gurusamy Sarathy Date: Tue, 14 Mar 2000 17:14:21 +0000 (+0000) Subject: tweak sort() notes (from Nathan Torkington) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f9a3635785b679fc3880535434ba4bdb1ce13e4c;p=p5sagit%2Fp5-mst-13.2.git tweak sort() notes (from Nathan Torkington) p4raw-id: //depot/perl@5730 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index ad20884..f14b8bb 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4119,9 +4119,9 @@ of a SUBNAME, you can provide a BLOCK as an anonymous, in-line sort subroutine. If the subroutine's prototype is C<($$)>, the elements to be compared -are passed by reference in C<@_>, as for a normal subroutine. If not, -the normal calling code for subroutines is bypassed in the interests of -efficiency, and the elements to be compared are passed into the subroutine +are passed by reference in C<@_>, as for a normal subroutine. This is +slower than unprototyped subroutines, where the elements to be +compared are passed into the subroutine as the package global variables $a and $b (see example below). Note that in the latter case, it is usually counter-productive to declare $a and $b as lexicals.