3 ms·
Because an array is a list of scalar, and an hash a map of scalars. If you want to access a scalar inside the list, you write $a[1], which means "the scalar at
by qalmakka 5y ago
Because an array is a list of scalar, and an hash a map of scalars. If you want to access a scalar inside the list, you write $a[1], which means "the scalar at the first position of list @a". If it was @a[1] it would have been inconsistent, because then a @ expression would have returned a scalar and not a list.