How do you write the following in Perl(provide exact Perl syntax): a) create hash "days_in_month" (hash variable name is "days_in_month") with two elements. First element with key "July" and value 31, second element with key "September" and value 30. Get hash element by key "September" and print its value (provide exact Perl syntax). What value should you get?
Would it be like this ?
my %days_in_month = (
'July' => '31',
'September' => '30',
);
my $dayvalue = $days_in_month{September};
print $dayvalue;
which perlorperl -v. You may find this question useful if you don't have it/want to install it: Is there is a website which allows me to test Perl online?