Variables
Dereferencing Symbols

 

  • Perl uses three special dereferencing symbols to differentiate variable types

      $ Scalar variables Single value of any type
      @ Array variables  Array of scalar values - integer index
      % Associative array variables Hash table of scalar values - string key

  • Conceptual Examples:

      $name "John"
      @johnRecordA Element 0 is "John"
      Element 1 is "Moreland"
      %johnRecordB Element "name" is "John"
      Element "age" is 34