我有一个像这样声明的哈希:
$test = {
"A" => "B",
"C" => "D",
"E" => "F",
};
Run Code Online (Sandbox Code Playgroud)
我想在数组中得到键["A","C","E"].我怎样才能做到这一点?
keys %{$test}
Run Code Online (Sandbox Code Playgroud)
(见:http://perldoc.perl.org/functions/keys.html)