Scalars


A single piece of data either a number or a string is called a 'scalar' in Perl.

  1. Scalar values
  2. undef
  3. Numbers - integers, real or floating-point
  4. Strings
  5. Scalar variables (use my)
  6. Sigils and variables
  7. Common error messages
  8. Greeting with a name, Variable interpolation
  9. User Input
  10. chomp
  11. Numerical Operators
  12. Autoincrement
  13. String Operators
  14. String - Number conversion
  15. Conditional statements: if
  16. Syntax of if statement
  17. Comparison operators
  18. Compare values - examples
  19. undef, the initial value and defined
  20. Boolean expressions (logical operators)
  21. Boolean values: TRUE and FALSE
  22. Your Salary is in Danger - Short-Circuit
  23. Exercise: Rectangular
  24. Exercise: Rectangular prompt
  25. Exercise: Rectangular warn
  26. Exercise: Concatenation
  27. Exercises: Simple Calculator
  28. Solution: Rectangular
  29. Solution: Rectangular prompt
  30. Solution: Rectangular warn
  31. Solution: Concatenation
  32. Solution: Simple Calculator
  33. Solution: Simple Calculator (using eval)
  34. String functions (length, lc, uc, index)
  35. String functions (index, rindex)
  36. String functions (substr)
  37. Strings - Double quoted
  38. Strings - Single quoted
  39. Scope of variables
  40. Scope of variables - 2
  41. Scope of variables - 3
  42. Scope of variables - 4
  43. Scope of variables - 5
  44. Random numbers
  45. Here documents - double quotes
  46. Here documents - single quotes
  47. Exercise: Number Guessing game
  48. Solution: Number Guessing game