in reply to Re: Hash/Array slice : how to exclude items?
in thread Hash/Array slice : how to exclude items?
I would create a shallow copy and delete the keys there
An alternative:
sub debug_hash ( $hashref, $bad_keys = [qw/ schema logger /] ) { delete local @$hashref{ @$bad_keys }; print Dumper $hashref; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Hash/Array slice : how to exclude items?
by choroba (Cardinal) on Jan 24, 2023 at 16:30 UTC | |
|
Re^3: Hash/Array slice : how to exclude items?
by bliako (Abbot) on Jan 24, 2023 at 22:44 UTC | |
by hv (Prior) on Jan 24, 2023 at 23:15 UTC | |
by bliako (Abbot) on Jan 24, 2023 at 23:27 UTC | |
by LanX (Saint) on Jan 25, 2023 at 01:44 UTC | |
by bliako (Abbot) on Jan 25, 2023 at 09:01 UTC | |
by LanX (Saint) on Jan 25, 2023 at 14:26 UTC |