summaryrefslogtreecommitdiff
path: root/pod/perlvar.pod
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-03 17:27:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-03 17:27:13 +0000
commit53e56e0a46451584819aaf58b0d3aee8f2ed60e3 (patch)
tree94d989072bbc209762fcb44e1c7c3f10ffd8e8ae /pod/perlvar.pod
parent56dd5b296bcdfa13210bc9018d4cc5ec40d2f1f0 (diff)
downloadperl-53e56e0a46451584819aaf58b0d3aee8f2ed60e3.tar.gz
Mention that lexicalizing $a or $b is a bad idea if one
wants to use sort(). p4raw-id: //depot/perl@10409
Diffstat (limited to 'pod/perlvar.pod')
-rw-r--r--pod/perlvar.pod4
1 files changed, 3 insertions, 1 deletions
diff --git a/pod/perlvar.pod b/pod/perlvar.pod
index da060557ff..b72f3571bd 100644
--- a/pod/perlvar.pod
+++ b/pod/perlvar.pod
@@ -118,7 +118,9 @@ test. Outside a C<while> test, this will not happen.
Special package variables when using sort(), see L<perlfunc/sort>.
Because of this specialness $a and $b don't need to be declared
(using local(), use vars, or our()) even when using the strict
-vars pragma.
+vars pragma. Don't lexicalize them with C<my $a> or C<my $b>
+if you want to be able to use them in the sort() comparison block
+or function.
=back