Perl Assignment Operators

Perl Assignment Operators

Perl Assignment Operators

Introduction

There wasn't much programming in chapter 1, but that changes now.

The best advice I can give you is to make sure you understand each new concept as it's presented. If you never get lost in the first place you won't have to find your way back. :)

None of this material is difficult. Just don't make it more difficult than it is.

For example.

A 'scalar' is a singular thing. A scalar variable is a variable that holds 1 value.

That's it.

An integer is a positive or negative whole number (i.e. a number without a decimal point).

That's it.

Don't worry so much about how you'll use these things beyond the discussion in the book. In other words, focus on what you're learning now, instead of what you think you might be doing later. What's the saying, "Don't borrow trouble." I think that's it. :)

List of topics

Scalars, p50
Integers, p50
Floating point numbers, p50
Literals (as opposed to variables), p51
Non-decimal literals (octal, hexadecimal, binary), Note: Don't get too preoccupied with this, p52
Numeric operators: +, -, *, /, % (modulo), ** (exponentiation) p52
Strings, p55
The utf-8 pragma, p55
Single-quoted strings and double-quoted strings, p55
Backslash escapes \n, etc (See table on page 58), p57
String operators: concatenation, repetition, p59
Conversion between numbers and strings, p60
Enabling/using warnings, p62
Enabling/using diagnostics, p63
Scalar variables, p65
Scalar variable assignment, p67
Binary assignment operators: +=, -=, *=, etc., p68
print, Note: briefly mentioned earlier on p41, p70
Interpolation of scalar variables, p70
Unicode code points, p73
Operator precendence and associativity (See table on p74), p73
Numeric comparison operators: <, <=, ==, etc., p75
String comparison operators, lt, le, eq, etc., p76
if structure, p78
Boolean values in Perl, p79
<STDIN>, p81
chomp, p83
while structure, p85
undef, p86
defined, p88


Final thoughts

If you have any questions about any of this stuff, this is a great place to ask them (i.e. in the Chapter 2 category).

So what are the Boolean values in Perl anyway? :)

Relevant pages: