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 happens when you return a reference to a private variable?
Write a program to decode the data in the form using cgi programming
Explain what is lvalue?
Explain join function in perl?
What are the arguments and what do they mean in perl programming?
How to add elements in a hash in perl?
Is perl compiler or interpreter?
What is perl scripting?
What does file test operators do in perl?
Why is it hard to call this function: sub y { "because" } ?
When does circular reference occur?
Hi, I am a accountant. I am preparing a balance sheet but because of staff shortage and time pressures I cant complete it on time. There is lot of common data with last years which I need not retype and I can manage by editing last year’s balance sheet ? Is their any software on net where I can do this easily??
how to create a flat file database as shown below s.no name age city phone 0 hema 22 Calcutta 4312542 1 hema 21 Bangalore 2344345 2 ganesh 25 delhi 2445454 3 kartik 45 pune 4312121 4 santosh 25 Hyderabad 2254231 5 kumar 25 mysore 2344567 6 gita 34 mangalore 6532123 7 gita 32 pune 2213456 Q1.print the details of the person who r from bangalore q2.Replace the city name managlore to pune q3.prints no of person having name gita and hema q4.print how many are of age 25.
Differences between die and exit.
List the data types that Perl can handle?