Skip to content

Commit

Permalink
Merge 5bc2a09 into 320f4ba
Browse files Browse the repository at this point in the history
  • Loading branch information
nwc10 committed Jul 17, 2021
2 parents 320f4ba + 5bc2a09 commit 462d9a9
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions pod/perlintro.pod
Expand Up @@ -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, but you have to declare them 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:
Expand All @@ -172,8 +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 look like
punctuation or line noise. 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
Expand Down Expand Up @@ -326,9 +325,7 @@ running the program. Using C<strict> is highly recommended.

=head2 Conditional and looping constructs

Perl has most of the usual conditional and looping constructs. As of Perl
5.10, it even has a case/switch statement (spelled C<given>/C<when>). See
L<perlsyn/"Switch Statements"> for more details.
Perl has most of the usual conditional and looping constructs.

The conditions can be any Perl expression. See the list of operators in
the next section for information on comparison and boolean logic operators,
Expand Down

0 comments on commit 462d9a9

Please sign in to comment.