I would like to print a hash but exclude some of its keys which I know they clog the logfile with useless info (e.g. schema and log objects). I don't want to delete the keys before printing it (it is passed on as parameter to other subs). Is there an exclude-slice selection? e.g. %hash{-'schema', -'log'}, meaning include everything except those. Obviously the minus sign can be part of the keyname and has a meaning in array indexing. So that's not going to fly. Anything else?
I have googled this earlier but did not find anything. If there isn't, is it because of the lack of operators? Can this be a feature for the future? If it exists, then how (without grep and friends)?
bw, bliako
In reply to Hash/Array slice : how to exclude items? by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |