Multiple choice technology programming languages

How many key-value pairs will the hash contain? my %hash = ( [1, 2] => 1, [1, 2] => 2 );

  1. 1

  2. 2

  3. 3

  4. 4

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Each execution of the array constructor [1, 2] creates a new, unique array reference. When used as hash keys, these references stringify to distinct strings (like 'ARRAY(0x...)'), resulting in two separate key-value pairs in the hash.