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

Perl references: create, dereference and debug with confidence

Mar 27, 2014 by David Farrell

development
variable
scalar
array
hash
reference

Learn enough to be dangerous with one of Perl’s most powerful features

Read it

Perl hash basics: create, update, loop, delete and sort

Jun 16, 2013 by David Farrell

development
loop
variable
hash
core
delete
add
key
value
pair
length
size

Hashes are one of Perl’s core data types. This article describes the main functions and syntax rules for for working with hashes in Perl.

Read it

Perl tokens you should know

May 11, 2013 by David Farrell

development
variable
token
global_variables
__package__
__end__
__data__

A brief review of some useful special literals

Read it

Dynamic variable names with a dereferencing block

May 2, 2013 by David Farrell

development
regex
variable
dereference
syntax

Perl is remarkably flexible and allows you to achieve all kinds of wizardry with the language. One example of this is using a dereferencing block to use a scalar value as a variable name. This allows you to use variables with dynamic names.

Read it

Test if the user is root

Apr 10, 2013 by David Farrell

development
flow
linux
unix
variable
windows
mac

When Perl is executing a program, it maintains the user id of the process owner in a global variable ($<). When a Perl program is executed by root or a user with root privileges (e.g. using the sudo command), the user id variable is always set to zero. This can be checked at the command line:

Read it

Upgrade your list printing using field separator variables

Apr 3, 2013 by David Farrell

development
string
variable
scalar
array
syntax

A typical way to print every element of an array in Perl is using a foreach loop:

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
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.