%group = ( 'forest', 'tree', 'crowd', 'person', 'fleet', 'ship' );
while ( ( $key, $value ) = each(%group) ) {
print "A $value is part of a $key.\n";
}
这是代码,输出是这样的
A person is part of a crowd.
A tree is part of a forest.
A ship is part of a fleet.
为什么我没有按照我在数组中给出的顺序得到输出?