Perl Thinking
 
Everything goes back to Unix
  • sed: s/// , tr/// , y///
     
  • C: printf()
     
  • awk: $NR
     
  • shell: quoting and backticks, dollar signs, globbing
Larry's a linguist
  • English-like constructions
     
  • Multiple ways to say things depending on meaning
TMTOWTDI
  • There's More Than One Way To Do It
     
  • The following are all identical:
    if ($cost < 0) { warn "Cost is negative"; }
    
    ($cost >= 0) or warn "Cost is negative";
    
    ($cost < 0) and warn "Cost is negative";
    
    warn "Cost is negative" if ($cost < 0);
    
    warn "Cost is negative" unless ($cost >= 0);
    
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 >>>