I find a strange behaviour by creating a hash:
perl -e "%x = (1 => 10, p2 => 20); while ( ($k,$v) = each %x ) { print \"key $k value $v\n\";}"
gives the following output:
key p2 value 20
key 1 value 10
But if I change the key p2 to 1p2 I get an error:
perl -e "%x = (1 => 10, 1p2 => 20); while ( ($k,$v) = each %x ) { print \"key $k value $v\n\";}"
The output is:
syntax error at -e line 1, near "1p2"
Execution of -e aborted due to compilation errors.
Why does it give an error?
(Win10, Strawberry Perl v5.30.0)