in reply to side effects of map

Yes. It's called autovivification. See perlref.