• MORE:
  • Perl Camel
  • rss
  • GitHub logo
Perl.com
  •   ABOUT
  •   AUTHORS
  •   CATEGORIES
  • #
      TAGS

Understanding the modulo operator

Nov 4, 2013 by David Farrell

development
operator
division
modulo

… and implementing a remainder function

Read it

Use the logical-or and defined-or operators to provide default subroutine variable behaviour

Jul 6, 2013 by David Farrell

development
modernperl
operator
subroutine

Perl subroutines do not have signatures so variables must be initialized and arguments assigned to them inside the subroutine code. This article describes two useful shortcuts that can simplify this process.

Read it

The conditional (ternary) operator

Apr 16, 2013 by David Farrell

development
operator
syntax

One way to reduce the verbosity of Perl code is to replace if-else statements with a conditional operator expression. The conditional operator (aka ternary operator) takes the form: logical test ? value if true : value if false.

Read it

List shortcuts: qw the quote whitespace operator

Apr 9, 2013 by David Farrell

development
operator
string
array
syntax

A popular way to build a list of literal quotes in Perl is to use the quote whitespace operator (qw). It’s terse, versatile and elegant. To see why, let’s look at a typical statement using a list of strings:

Read it

Repeat strings with the repetition operator Repeat strings with the repetition operator

Apr 2, 2013 by David Farrell

development
operator
string

You get the idea - Perl has a repetition operator (x) that repeats the scalar or list on its left by the number on it’s right (like multiplication).

Read it

Perl string functions - concatenate substring and split

Mar 31, 2013 by David Farrell

development
operator
string
syntax

Perl has many string functions, let’s take a look at a some of the most common ones: concatenate, substring and split.

Read it

Quoting strings in Perl - even ones containing apostrophes and quote or speech marks

Mar 30, 2013 by David Farrell

development
operator
string
variable

Broadly speaking Perl has two types of strings: quotes that are interpolated at runtime and literal quotes that are not interpolated. Let’s review each of these in turn.

Read it

How to install a specific version of a Perl module with CPAN

Mar 27, 2013 by David Farrell

cpan
configuration
cpan
module
operator

Read it
Page 1 of 1
Site Map
  • Home

  • About

  • Authors

  • Categories

  • Tags

Contact Us

To get in touch, send an email to perl.com-editor@perl.org, or submit an issue to perladvent/perldotcom on GitHub.

Perl Camel rss GitHub logo

License

This work is licensed under a Creative Commons Attribution-NonCommercial 3.0 Unported License.

Creative Commons License

Legal

Perl.com and the authors make no representations with respect to the accuracy or completeness of the contents of all work on this website and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. The information published on this website may not be suitable for every situation. All work on this website is provided with the understanding that Perl.com and the authors are not engaged in rendering professional services. Neither Perl.com nor the authors shall be liable for damages arising herefrom.