in reply to Re: Correct keys in hashes
in thread Correct keys in hashes
automatically quoted strings [...] more or less matching /^([1-9]\d*)|([a-zA-Z_]\w*)$/
No, it doesn't match numbers at all. If => autoquoted numbers, the key would be a bunch of 9s in the example below. Non-strings (numbers, references, etc) are converted to strings (although I think there is planned change to preserve the type of the key, maybe in perl6), but that's not the same as quoting. I think that means that if and only if it's a valid subroutine name, it'll get autoquoted.
>perl -le " %a = (999999999999999999999999999999999999 => ''); print keys %a"; 1e+036 >perl -le " %a = (999999999999999999999999999999999999, ''); print keys %a"; 1e+036
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Correct keys in hashes
by Joost (Canon) on Aug 25, 2004 at 16:10 UTC |