Ævar Arnfjörð Bjarmason wrote: > Returning a flattened list is idiomatic in Perl, it means that a caller > can do any of: > > # I only care about the last value for a key, or only about > # existence checks > my %hash = func(); I was staying on the sideline because I don't know what's idiomatic in Perl, but Perl and Ruby share a lot in common (one could say Perl is the grandfather of Ruby), and I do know very well what's idiomatic in Ruby. In perl you can do $ENV{'USER'}, and: while (my ($k, $v) = each %ENV) { print "$k = $v\n"; } Obviously it's idiomatic to use hashes this way [1]. It was a waste for Git::config_regexp to not do the sensible thing here. You can do exactly the same in Ruby: ENV['USER'] ENV.each { |k, v| print "#{k} = #{v}\n" } And the way I would parse these configurations in Ruby is something like: c = `git config -l -z`.split("\0").map { |e| e.split("\n") }.to_h c['sendemail.smtpserver'] And this just gave me an idea... [1] https://perldoc.perl.org/functions/each -- Felipe Contreras