Skip to Content
Perl by Example
book

Perl by Example

by Ellie Quigley
December 2014
Beginner
888 pages
25h 23m
English
Addison-Wesley Professional
Content preview from Perl by Example

Chapter 6. Where’s the Operator?

Image

In the real world, there are operators who operate switchboards, computers, bulldozers, tanks, and so forth. In Perl, operators operate on numbers and strings, or a combination of them. Operators are symbols, such as +, -, =, >, <, that produce a result based on some rules. This chapter is all about Perl operators, their use, and their rules.

By the end of this chapter, you should be able to explain how Perl evaluates the following example:

$year=(localtime)[5] + 1900;$year % 100 == 0 && $year % 400 == 0 || $year % 100 != 0 &&$year % 4 == 0? printf "Year %d is leap year.\n",$year : ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Perl

Beginning Perl

Curtis Ovid Poe
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe
Mastering Perl

Mastering Perl

brian d foy
Learning Perl 6

Learning Perl 6

brian d foy

Publisher Resources

ISBN: 9780133593068Purchase book