Answer Posted / savitha sridhar
Hash or "Associative Array" is an unordered list of scalar
data. The data of the hash is depicted as key and a value
pair.
Eg: %h=("kar","blr","ap","hyd","tn","che");
To print the entire hash : print %h; --returns entire hash
(the order may be different)
To print only one value : print $h{"kar"}; -->returns blr
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are the various file operations in perl. Explain with example.
Explain 'grep' function.
You want to empty an array. How would you do that?
What is the difference between use and require in perl?
How will you open a file in read-only mode in perl?
How to read from a pipeline with Perl
What are the different ways to run cgi?
How to add elements in a hash in perl?
Define perl scripting?
Can we load binary extension dynamically?
Differentiate between arrays and list in perl.
Explain the meaning of subroutine?
What are the various perl data types based on the context?
How can you create anonymous subroutines?
What is the usage of -i and 0s options?