in reply to unexpected modify hash in a distance with grep { $_ }
printf "grep: %s\n", (join " ... ", grep { $_ } $$h{a}, $$h{x}, $$h{b}, $$h{c});
Not a problem with grep. $$h{x} is autovivified before grep happens.
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: unexpected modify hash in a distance with grep { $_ }
by LanX (Saint) on Dec 20, 2019 at 18:19 UTC | |
by afoken (Chancellor) on Dec 20, 2019 at 21:06 UTC | |
by leszekdubiel (Scribe) on Dec 20, 2019 at 21:14 UTC | |
by LanX (Saint) on Dec 20, 2019 at 21:42 UTC |