```{index} single: legal_keys; Hash::Util function ``` ```{index} single: Hash::Util::legal_keys; Perl function ``` # legal_keys List every key the restricted hash *is allowed to carry* - visible keys plus hidden placeholders. ## Synopsis ```perl my @legal = legal_keys(%hash); ``` On an unrestricted hash this is equivalent to `keys %hash`. On a restricted hash it is the visible keys (`keys %hash`) merged with whatever `hidden_keys` would report.