Write a Perl program that uses a hash and a large number ofoperations on the hash. For example, the hash could store people’snames and their ages. A random- number generator could be used tocreate three- character names and ages, which could be added to thehash. When a duplicate name was generated, it would cause an accessto the hash but not add a new element. Rewrite the same programwithout using hashes. Compare the execution efficiency of the two.Compare the ease of programming and readability of the two.
Solution
Perl Code usinghash
my @chars = (“A”..”Z”, “a”..”z”); #list of characters used fornaming
my %data; #declare
OR
OR