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
What is boolean context?
Why should I use the -w argument with my Perl programs?
What is perl shift array function?
Explain what is lvalue?
How will you open a file in a write-only mode in perl?
What does the q{ } operator do?
Is there any way to add two arrays together?
You want to empty an array. How would you do that?
When do you use perl programming?
What is a chop() function in perl?
What are prefix dereferencer? List them.
what are the two ways to get private values inside a subroutine or block?
How to check the status of airplane mode (enable/disable) in perl for Android mobile?
How to open and read data files with Perl
explain the various functions/directives in perl that allow you to include/import a module. Also, state the differences between them.