Scalar Values and List Values

This section describes what is a scalar value, a single numeric value or a string of characters, and what is a list value, a list of scalar values.

Perl support only support two types of values: Scalar Value and List Value.

1. Scalar Value - A single value with two sub types: Numeric Scalar Value and String Scalar Value .

2. List Value - An ordered list of scalar values. Individual scalar values in a list value are called elements of the list value. An element can be identified by its ordered position in the list. Numeric scalar values and string scalar values can be mixed in a single list value.

For example, ("Sun","Mon","Tue","Wed") is a list value with 4 elements. The first element (identified by position 0) is the string scalar value "Sun". The second element (identified by position 1) is the string scalar value "Mon".

Another example, ("PI", 3.14, "Price", 9.99) is a list value with 4 elements mixed with both string scalar values and numeric scalar values. The first element (identified by position 0) is the string scalar value "PI". The second element (identified by position 1) is the numeric scalar value 3.14.

Table of Contents

 About This Book

 Perl on Linux Systems

 ActivePerl on Windows Systems

Data Types: Values and Variables

Scalar Values and List Values

 Scalar Value Constructors

 Scalar Value Interpretation

 List Value Constructors

 Variables - Scalar, Array and Hash

 Using Scalar Variables

 Using Array Variables

 Using Hash Variables

 "undef" Value and Undefined Variables

 Expressions, Operations and Simple Statements

 User Defined Subroutines

 Perl Built-in Debugger

 Name Spaces and Perl Module Files

 Symbolic (or Soft) References

 Hard References - Addresses of Memory Objects

 Objects (or References) and Classes (or Packages)

 Typeglob and Importing Identifiers from Other Packages

 String Built-in Functions and Performance

 File Handles and Data Input/Output

 Open Files in Binary Mode

 Open Directories and Read File Names

 File System Functions and Operations

 Converting Perl Script to Executable Binary

 Using DBM Database Files

 Using MySQL Database Server

 Socket Communication Over the Internet

 XML::Simple Module - XML Parser and Generator

 XML Communication Model

 SOAP::Lite - SOAP Server-Client Communication Module

 Perl Programs as IIS Server CGI Scripts

 CGI (Common Gateway Interface)

 XML-RPC - Remote Procedure Call with XML and HTTP

 RPC::XML - Perl Implementation of XML-RPC

 Integrating Perl with Apache Web Server

 CGI.pm Module for Building Web Pages

 LWP::UserAgent and Web Site Testing

 References

 PDF Printing Version