Answer Posted / raghav
Hash/Associative array is the one in which all
the values are stored in terms of keys and values.
i.e., the values are indexed with the help of keys.
You cannot get back the values in a correct order as it
happens in normal array. because in this values are stored
in random positions. The only way to get in a correct order
is to sort that array.
ex: %hash = {"Name","Raghav","Age","26"};
$hash{'Name'} will give "Raghav"
$hash{'Age'} will give "26"
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Comment on array slicing and range operator
What are the two ways to get private values inside a subroutine?
How to create a package?
What is perl? What is the basic command to print a string in perl?
What are hashes?
what is the difference between java and cgi?
What does this symbol mean '->'?
Explain the functioning of conditional structures in perl.
How many ways can we express string in Perl?
How to add elements in a hash in perl?
Explain the meaning of closure in perl.
What is the usage of -i and 0s options?
Differentiate use and require?
What is qq (double q)operator in perl?
Demonstrate subroutines in perl with a simple example.