Perl References


  1. Passing values to a function
  2. Add two (or more) arrays
  3. Array References
  4. Add two arrays
  5. Array References
  6. Process arrays without copying
  7. Scope of variables
  8. Reference counting
  9. More Reference Counting
  10. Process arrays without copying even the return values
  11. Hash References
  12. Print out the content of a reference
  13. Debugging (pretty printing)
  14. Change values in a reference
  15. Exercise: double numbers
  16. Exercise: Add many arrays
  17. Exercise: Function to compare two hashes
  18. Solution: Double numbers
  19. Solution: Add many arrays
  20. Solution: Add many arrays
  21. Solution: Function to compare two hashes
  22. Anonymous Arrays
  23. Array of Arrays
  24. Array of Arrays (AoA)
  25. Many dimensional arrays
  26. Anonymous hashes
  27. Hash of Hashes (HoH)
  28. More complex data structures
  29. Memory leak with cross references
  30. Memory leak with cross references - weaken
  31. Read CSV file
  32. Exercise: read in an ini file
  33. Exercise: improve the csv reader
  34. Solution: Read ini file
  35. Solution: improve the csv reader
  36. autovivification
  37. Scalar references
  38. Subroutine references
  39. Anonymous subroutines
  40. Uses of Subroutine references
  41. Exercise: DNA Sequence Analyzer
  42. Solution: DNA Sequence Analyzer
  43. Exercise: DNA Sequence Analyzer with callback
  44. Solution: DNA Sequence Analyzer with callback
  45. Exercise: DNA Sequence Analyzer with shortcut
  46. Solution: DNA Sequence Analyzer with shortcut
  47. Dispatch Table
  48. Dispatch Table using symbolic refernces
  49. The ref() function
  50. Copy a data structure
  51. Deep copy
  52. Deep copy - Storable dclone
  53. Serialization
  54. Data::Dumper
  55. Data::Dumper both dump and restore
  56. Storable
  57. Storable in memory freezing
  58. YAML
  59. YAML in one file
  60. JSON in one file
  61. Main uses of references
  62. Exercise: save ini and csv as YAML
  63. Exercise: Create a cache for NetSlow
  64. Exercise: create a function that generates numbers multiplyers
  65. Solution: save ini and csv as YAML
  66. Solution: Create a cache for NetSlow
  67. Solution: NetSlow cache with timeout
  68. Resources