(your title doesn't really match up with the problem as described)
The => operator generally quotes the value on its left hand side. There are however exceptions, and you've stumbled across one of them. The automatic quoting only works when all of the characters in the key name are 'word' characters (i.e. ones that match \w in regular expressions). The string 'content-type' contains a '-' which isn't a world character. Unquoted, Perl interprets that as 'content' - 'type' which doesn't make much sense. The best way round this problem is to quote the key.
--
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: How do I use strict with asub( a = 'b' ) syntax?
by davorg
in thread How do I use strict with asub( a = 'b' ) syntax?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |