Strings: Single Quoted
 
Single-quoted Strings
  • Each character is the character it shows, except...
     
  • To put in a single-quote, backslash it.
    $song = 'Ain\'t Misbehavin\'';
     
  • To put in a backslash, backslash it.
    $path = 'k:\\perl\\docs';
     
  • Can even contain newline characters:
    $signoff =
    'xoxo,
    Andy';

    The string above contains 10 characters.
Index
Introduction
What Is Perl?
Perl Resources
Running a Perl Program
Perl Thinking
Data Types
Scalars
Strings: Single Quoted
Strings: Double Quoted
Scalar operations
Scalar comparisons
Variables
Lists
Using Lists
Control Structures
Hashes
Hash Manipulation
File Handling
Regex Matching
Regex Matching: Ex. 1
Regex Matching: Ex. 2
Regex Replacing
Subroutines
Anonymous subs
References
Structures
Modules
Modules: File::Find
Modules: Internet
Modules: Win32::*
Everything Else
  Next page >>>