while( my($key, $value) = each %ENV ) { ... } # while