summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-07-01 08:55:42 +0000
committerKarl Williamson <khw@cpan.org>2021-07-17 06:42:19 -0700
commit3ccfac5d0b3697001c98d81e3d367041cdf6f63a (patch)
tree740b452eb2a75b899422f651bb78640b3f4ebbba /pod
parent69144239fba351a44069a6d49befe62270395f6a (diff)
downloadperl-3ccfac5d0b3697001c98d81e3d367041cdf6f63a.tar.gz
Refine the changes to perlintro.pod after feedback and discussion.
Following useful feedback and suggestions from Neil Bowers, Jason McIntosh and Dan Book, try to make the sentances shorter and clearer. Hopefully also avoid some potential abmiguities about "special variables" not just being all-punctuation or scalars.
Diffstat (limited to 'pod')
-rw-r--r--pod/perlintro.pod10
1 files changed, 4 insertions, 6 deletions
diff --git a/pod/perlintro.pod b/pod/perlintro.pod
index 0693ab6f2a..c4a6d758f6 100644
--- a/pod/perlintro.pod
+++ b/pod/perlintro.pod
@@ -161,9 +161,8 @@ A scalar represents a single value:
my $answer = 42;
Scalar values can be strings, integers or floating point numbers, and Perl
-will automatically convert between them as required. There is no need
-to pre-declare your variable types - just declare their names using
-the C<my> keyword the first time you use them. (This is one of the
+will automatically convert between them as required. You have to declare
+them using the C<my> keyword the first time you use them. (This is one of the
requirements of C<use strict;>.)
Scalar values can be used in various ways:
@@ -172,9 +171,8 @@ Scalar values can be used in various ways:
print "The animal is $animal\n";
print "The square of $answer is ", $answer * $answer, "\n";
-There are a number of "magic" scalars with names that use punctuation symbols,
-and a few that are all uppercase letters.
-These special variables are used for all
+Perl defines a number of special scalars with short names, often single
+punctuation marks or digits. These variables are used for all
kinds of purposes, and are documented in L<perlvar>. The only one you
need to know about for now is C<$_> which is the "default variable".
It's used as the default argument to a number of functions in Perl, and