in reply to Hash table key names with a minus

Valid unquoted strings, such as bare literal hash keys, consist of \w characters only. They are: A-Za-z0-9 and underscore (_). You can have leading or trailing whitespace, which can come in handy. Hoewever, the - character is not allowed, and forces it to be a normal expression.

Without strict, it's allowed, because without strict it's allowed to use unquoted strings everywhere, not only in literal hash keys and the left operand of the => operator.

# Assuming you don't have subs called POWER and/or NODE. no strict; $run{POWER-NODE} = yes; # equals: $run{ 'POWER' - 'NODE' } = 'yes'; # equals: $run{ 0 - 0 } = 'yes'; # and thus: $run{0} = 'yes';
Consider:
$foo{99-24} = "Hello, world!\n"; print $foo{75};


With strict, you can't use the unquoted strings POWER, NODE and yes. You'll have to add quotes as such: $run{'POWER-NODE'} = 'yes'. When you get rid of the -, and use an underscore instead, you can use an unquoted string after all (strict makes an exception for =>'s left operand, and for literal constant hash keys) like this: $run{POWER_NODE} = 'yes'.

U28geW91IGNhbiBhbGwgcm90MTMgY
W5kIHBhY2soKS4gQnV0IGRvIHlvdS
ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
geW91IHNlZSBpdD8gIC0tIEp1ZXJk