I have to expressions:
%MON = months => 1, end_of_month => 'limit'; # months => undef
%MON = ( months => 1, end_of_month => 'limit' );
Why first expression results only one key months
with undef
value?
What is the difference between them?
See perlop. =
has higher precedence than =>
%MON = months => 1, end_of_month => 'limit';
Is equivalent to:
(%MON = "months"), 1, "end_of_month", "limit"
While:
%MON = ( months => 1, end_of_month => 'limit' );
is:
%MON = ("months", 1, "end_of_month", "limit")