my ($hash, $key) = @_;
CORE::exists $hash->{$key};
}
+
sub keys {
my ($hash) = @_;
- [ CORE::keys %{$hash} ];
+ [ CORE::keys %$hash ];
}
sub values {
my ($hash) = @_;
- [ CORE::values %{$hash} ];
+ [ CORE::values %$hash ];
+}
+
+sub kv {
+ my ($hash) = @_;
+ [ CORE::map { [ $_, $hash->{$_} ] } CORE::keys %$hash ];
}
1;
\ No newline at end of file