#!/usr/bin/perl6 use v6; =begin pod Use the :exists adverb if you want to check if a key is present in a hash. TODO should be say %person{'fname'} :exists ?? "fname exists" !! "fname is missing"; say %person{'email'} :exists ?? "email exists" !! "email is missing"; In any case this is not implemented in Rakudo. =end pod my %person = ( fname => 'Foo', lname => 'Bar', ); say %person{'fname'} :exists ?? "fname exists" !! "fname is missing"; say %person{'email'} :exists ?? "email exists" !! "email is missing";