Re: code review - JSON parsing and data structures



On 2010-12-17 11:46, Wolf Behrenhoff wrote:

say $h->{-baden}
is valid syntax and the same as
say $h->{"-baden"}

Not true. It is the same as $h->{ -'baden' }.

perl -MO=Deparse -e'$h->{-baden}'
$$h{-'baden'};
-e syntax OK

perl -MO=Deparse -e'$h->{- -baden}'
$$h{-(-'baden')};
-e syntax OK

perl -MData::Dumper -e'$h->{- -baden} = 1; print Dumper($h)'
$VAR1 = {
'+baden' => 1
};


--
Ruud
.