3 ms·
perl only does this in some cases; unlike with std::map, this is safe: my $x = $h{$v}; this is not safe because it autovivifies $h{$v} as an ARRAY ref:
by kragen 4y ago
perl only does this in some cases; unlike with std::map, this is safe:
my $x = $h{$v};
this is not safe because it autovivifies $h{$v} as an ARRAY ref:
my $x = $h{$v}[$i];
with respect to idiosyncratic behavior, if a language doesn't have idiosyncratic behavior, it has no reason to exist; it's just gratuitously incompatible syntax for already-available semantics