in reply to Re: Tidy up json from nulls, empty arrays and hashes
in thread Tidy up json from nulls, empty arrays and hashes
That's not true, and that's why the syntax is confusing.
$ perl -Mstrict -we 'my $r = {}; say $$r' Not a SCALAR reference at -e line 1.
If $r is a hash ref, then %$r is a hash, then $$r{$k} is a value in that hash. Therefore, I prefer the $r->{$k} syntax.
|
|---|