class testing { method newhash(*%args) { for %args.sort(*.key)>>.kv -> ($k, $v) { say "Hash Key $k => Value $v"; } %args.perl.say; } } my $x = testing.newhash(a => 1, b => 2, c => 3, d => 4);