Software >> Development >> Languages >> Perl >>  What are the valid data types and their examples

3 main types (1) Scalar example 1-1, an array (a.k.a list) of integers %foo = (); $foo[0] = 1; $foo[1] = 2; $foo[2] = 3; example 1-2, @foo = ( 1, 2, 3, ); (2) Array of Scalars example 2-1 ...<pending> (3) Associative array of Scalars example 3-1 $HASH{"one"} = 1, $HASH{"two"} = 2, $HASH{"three"} = 3 or $HASH = { one => 1, two => 2, three => 3 }