Hash/ Associative arrays in Perl are also responsible for storing multiple elements together in one variable, as a key value pair.
#!/usr/bin/perl print "content-type: text/html \n\n"; %country_capital_hash=( 'india' => 'New Delhi', 'china' => 'beiging' ); print "Capital of India is $country_capital_hash{'india'}\n";
Output: ------- Capital of India is New Delhi
AllBlogToolsFacebook comments for blogger brought to you by AllBlogTools.com , Get Yours?