What is the most efficient way to test whether an associated array is
empty, unset or does not exist?
There are really only two interesting states: with set elements and
without. You can see whether there are any set elements by testing
whether ${#a[@]} is greater than 0. If it's 0, there are no set elements.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/