Terrestrial plants need to maintain their water balance, while still allowing the exchange of gases between the plant cells and the external environment. Gas exchange occurs through stomata, which also allows the escape of water vapour. The image above shows a cross section of a leaf from Marram grass, common on sand dunes, where it is very salty and often dry. You can see how the leaf is rolled, creating an internal micro-climate that is much more humid than the external environment. This reduces water loss and allows stomata to remain open, even in the driest of climates. PIne needles (Pinus) and Casaurina also have cylindrical leaves, an adaptation for dry environments.
The sunken stomata in this image (cross section of a leaf) allows a moist layer of air above the stomata, protecting the leaf from excessive evaporation.
This image shows a cross section of a leaf from a plant adapted to a very arid environment. The stomata are sunken into pits with lots of epidermal hairs, which provide a humid micro-climate, allowing the stomata to remain open, despite very dry external conditions.