Perl References
- Uses cases for references
- References
- Array References
- Hash References
- Scalar references
- Subroutine references
- Passing values to a function
- Add two (or more) arrays
- Add two arrays
- Array References
- Process arrays without copying
- Scope of variables
- Reference counting
- More Reference Counting
- Process arrays without copying even the return values
- Debugging (pretty printing)
- Change values in a reference
- Exercise: double numbers
- Exercise: Add many arrays
- Exercise: Function to compare two hashes
- Solution: Double numbers
- Solution: Add many arrays
- Solution: Add many arrays
- Solution: Function to compare two hashes
- Anonymous Arrays
- Array of Arrays
- Array of Arrays (AoA)
- Many dimensional arrays
- Anonymous hashes
- Hash of Hashes (HoH)
- More complex data structures
- Memory leak with cross references
- Memory leak with cross references - weaken
- Read CSV file
- Exercise: read in an ini file
- Exercise: improve the csv reader
- Solution: Read ini file
- Solution: improve the csv reader
- autovivification
- Scalar references in Getopt::Long
- Anonymous subroutines
- Uses of Subroutine references
- Exercise: DNA Sequence Analyzer
- Solution: DNA Sequence Analyzer
- Exercise: DNA Sequence Analyzer with callback
- Solution: DNA Sequence Analyzer with callback
- Exercise: DNA Sequence Analyzer with shortcut
- Solution: DNA Sequence Analyzer with shortcut
- Dispatch Table
- Dispatch Table using symbolic references
- The ref() function
- Copy a data structure
- Deep copy
- Deep copy - Storable dclone
- Serialization
- Data::Dumper
- Data::Dumper both dump and restore
- Storable
- Storable in memory freezing
- YAML
- YAML in one file
- JSON in one file
- Main uses of references
- Exercise: save ini and csv as YAML
- Exercise: Create a cache for NetSlow
- Exercise: create a function that generates numbers multipliers
- Solution: save ini and csv as YAML
- Solution: Create a cache for NetSlow
- Solution: NetSlow cache with timeout
- Resources