How to retrieve unique values from @array and store in %hash
conside @top array contains duplicate values, you can retrieve unique values and count of duplicate values and
store it in hash, hash is nothing but an associative array, it stores value along with the key.
my %hash = ();
In the above code unique values from @top is retrieved and stored in %hash , here array values is stored as the key and
the count of duplicate value is stored as the value to the key.