Scalar operations
 
Math operators
  • Standard math operators apply:
    * for multiplication,
    / for division,
    % for modulo,
    ** for exponentiation, etc
String operators
  • x gives multiple instances of the left arg.
    "x" x 10 gives "xxxxxxxxxx"
     
  • . concatenates strings
Operations sample
  • nanaheyhey.pl:
    #!perl -w
    
    print ((("Na " x 4) . "\n") x 2);
    print (("Hey " x 3) . "\n");
    print "Goodbye\n";
    Na Na Na Na
    Na Na Na Na
    Hey Hey Hey
    Goodbye
    
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 >>>