in reply to Re^2: syntax error
in thread syntax error
See my post here for a lot of examples and explanation :-) In short, from perldata:
... a simple identifier within such curlies is forced to be a string, and likewise within a hash subscript. Neither need quoting. ... This means for example that $version{2.0}++ is equivalent to $version{2}++, not to $version{'2.0'}++.
$h{1586} works because it's interpreted as an integer, so something like $h{0+1586}, which stringifies to "1586".
|
|---|